From: Felix Dörre Date: Wed, 8 Feb 2017 08:02:48 +0000 (+0100) Subject: fix: empty-variable "version" in development runs. X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=ef4e1fb737eabb4d9816f63d19453dcc88b25662 fix: empty-variable "version" in development runs. Change-Id: Ia0cdebab2e2b8f7733c59280086db8a72ab73941 --- diff --git a/src/org/cacert/gigi/pages/AboutPage.java b/src/org/cacert/gigi/pages/AboutPage.java index 0ab20111..a4b1d897 100644 --- a/src/org/cacert/gigi/pages/AboutPage.java +++ b/src/org/cacert/gigi/pages/AboutPage.java @@ -19,7 +19,11 @@ public class AboutPage extends Page { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { PrintWriter out = resp.getWriter(); HashMap 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); }