WebXmlSettings webxmlSettings = new WebXmlSettings(context);\r
\r
// 0.7.0 web.properties in the deployed war folder\r
- File overrideFile = new File(context.getRealPath("/WEB-INF/web.properties"));\r
- if (overrideFile.exists()) {\r
- webxmlSettings.applyOverrides(overrideFile);\r
+ String webProps = context.getRealPath("/WEB-INF/web.properties");\r
+ if (!StringUtils.isEmpty(webProps)) {\r
+ File overrideFile = new File(webProps);\r
+ if (overrideFile.exists()) {\r
+ webxmlSettings.applyOverrides(overrideFile);\r
+ }\r
}\r
+ \r
\r
// 0.8.0 gitblit.properties file located outside the deployed war\r
// folder lie, for example, on RedHat OpenShift.\r
- overrideFile = getFileOrFolder("gitblit.properties");\r
+ File overrideFile = getFileOrFolder("gitblit.properties");\r
if (!overrideFile.getPath().equals("gitblit.properties")) {\r
webxmlSettings.applyOverrides(overrideFile);\r
}\r