Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I shouldn't be left unattended near a computer #273

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading