Skip to content

Commit

Permalink
I shouldn't be left unattended near a computer
Browse files Browse the repository at this point in the history
  • Loading branch information
guusdk committed Sep 19, 2024
1 parent c74fbdf commit d3f2608
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
19 changes: 0 additions & 19 deletions src/main/java/org/jivesoftware/site/DownloadServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,6 @@ public static DownloadInfo forType(int type)
{
return Arrays.stream(DownloadInfo.values()).filter(d -> d.getType() == type).findFirst().orElse(null);
}

public static DownloadInfo getDownloadInfo(int type)
{
switch (type) {
case 0: return openfire;
case 1: return spark;
case 2: return smack;
case 3: return xiff;
case 4: return spark_update;
case 5: return openfire_plugin;
case 6: return spark_plugin;
case 7: return wildfire;
case 8: return wildfire_plugin;
case 9: return whack;
case 10: return sparkweb;
case 11: return tinder;
default: return null;
}
}
}

public void doGet(HttpServletRequest request, HttpServletResponse response) throws
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jivesoftware/site/DownloadStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ public void run() {
rs = pstmt.executeQuery();

while (rs.next()) {
final int type = rs.getInt(2);
long amount = rs.getLong(1);

final DownloadServlet.DownloadInfo downloadInfo = DownloadServlet.DownloadInfo.getDownloadInfo(type);
final int type = rs.getInt(1);
long amount = rs.getLong(2);
Log.debug("Iterate over type {}, amount {}", type, amount);
final DownloadServlet.DownloadInfo downloadInfo = DownloadServlet.DownloadInfo.forType(type);
if (downloadInfo == null) {
continue;
}
Expand Down

0 comments on commit d3f2608

Please sign in to comment.