Commits

Rich Manalang [Atlassian] committed 07125af

AMPS-873 Dev toolbar is broken when fastev is disabled -- this fixes this issue

Comments (0)

Files changed (1)

src/main/java/com/atlassian/devrel/servlet/ToolbarServlet.java

         context.put("navBarMenuItems", webInterfaceManager.getDisplayableItems("dev-toolbar-menu", condition));
         context.put("app", applicationProperties);
         context.put("sdkVersion", System.getProperty("atlassian.sdk.version", "3.7 or earlier"));
-        context.put("fastDevVersion",pluginAccessor.getPlugin("com.atlassian.labs.fastdev-plugin").getPluginInformation().getVersion());
         context.put("devToolboxVersion",pluginAccessor.getPlugin("com.atlassian.devrel.developer-toolbox-plugin").getPluginInformation().getVersion());
 
+        // added this try/catch to prevent issues when FastDev is disabled.
+        try {
+            context.put("fastDevVersion",pluginAccessor.getPlugin("com.atlassian.labs.fastdev-plugin").getPluginInformation().getVersion());
+        } catch(NullPointerException e) {
+            context.put("fastDevVersion", "disabled");
+        }
+
+
         resp.setContentType("text/html;charset=utf-8");
         renderer.render(TOOLBAR_TEMPLATE, context, resp.getWriter());
     }