fix: empty-variable "version" in development runs.
authorFelix Dörre <felix@dogcraft.de>
Wed, 8 Feb 2017 08:02:48 +0000 (09:02 +0100)
committerFelix Dörre <felix@dogcraft.de>
Wed, 8 Feb 2017 08:02:59 +0000 (09:02 +0100)
Change-Id: Ia0cdebab2e2b8f7733c59280086db8a72ab73941

src/org/cacert/gigi/pages/AboutPage.java

index 0ab201119b4361a3403b8e05e5ec8bcabcd6faa9..a4b1d897a78a2b6c9a72e0318b5e8a5e4fa44eac 100644 (file)
@@ -19,7 +19,11 @@ public class AboutPage extends Page {
     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
         PrintWriter out = resp.getWriter();
         HashMap<String, Object> o = new HashMap<>();
-        o.put("version", Package.getPackage("org.cacert.gigi").getImplementationVersion());
+        String version = Package.getPackage("org.cacert.gigi").getImplementationVersion();
+        if (version == null) {
+            version = "development";
+        }
+        o.put("version", version);
         getDefaultTemplate().output(out, getLanguage(req), o);
     }