]> WPIA git - gigi.git/commitdiff
Thanks Find bugs for that small error.
authorFelix Dörre <felix@dogcraft.de>
Wed, 27 Aug 2014 10:35:41 +0000 (12:35 +0200)
committerFelix Dörre <felix@dogcraft.de>
Wed, 27 Aug 2014 10:44:28 +0000 (12:44 +0200)
src/org/cacert/gigi/Gigi.java
src/org/cacert/gigi/output/CertificateValiditySelector.java
src/org/cacert/gigi/ping/PingerDaemon.java

index 7a9aaffd4e00681ee6b698d4f75e3af632a0d927..eab09850fdea2acc36f8e41271375647c09e1f02 100644 (file)
@@ -67,7 +67,7 @@ public class Gigi extends HttpServlet {
 
     public Gigi(Properties conf) {
         if (instance != null) {
-            new IllegalStateException("Multiple Gigi instances!");
+            throw new IllegalStateException("Multiple Gigi instances!");
         }
         instance = this;
         DatabaseConnection.init(conf);
index a58ca87302424a1769f896abb22eff2fafaea530..37e5afd224bf03a6e0f912dd52365f25f0fcc6a9 100644 (file)
@@ -17,7 +17,7 @@ public class CertificateValiditySelector implements Outputable {
 
     private static ThreadLocal<SimpleDateFormat> fmt = new ThreadLocal<>();
 
-    private static final int DAY = 1000 * 60 * 60 * 24;
+    private static final long DAY = 1000 * 60 * 60 * 24;
 
     private Date from;
 
index 253780cbe19a041926b204d78b5c1f89b9ee7ad9..ac61f14cdcb0b6517809342d6ca379a107bd544a 100644 (file)
@@ -62,7 +62,7 @@ public class PingerDaemon extends Thread {
                 }
                 enterPingResult.setInt(1, rs.getInt("id"));
                 String resp = dp.ping(Domain.getById(rs.getInt("domainid")), config, User.getById(rs.getInt("memid")));
-                enterPingResult.setString(2, resp == DomainPinger.PING_STILL_PENDING ? "open" : resp == DomainPinger.PING_SUCCEDED ? "success" : "failed");
+                enterPingResult.setString(2, DomainPinger.PING_STILL_PENDING == resp ? "open" : DomainPinger.PING_SUCCEDED.equals(resp) ? "success" : "failed");
                 enterPingResult.setString(3, resp);
                 enterPingResult.setString(4, token);
                 enterPingResult.execute();