- Output real RAW content, not simulated RAW content (issue 114)\r
- Fixed Lucene charset encoding bug when reindexing a repository (issue 112)\r
- Fixed null pointer in LdapUserSerivce if account has a null email address (issue 110)\r
+- Really fixed failure to update a GO setting from the manager (issue 85)\r
\r
#### additions\r
\r
String content = FileUtils.readContent(propertiesFile, "\n");\r
for (Map.Entry<String, String> setting:settings.entrySet()) {\r
String regex = "(?m)^(" + regExEscape(setting.getKey()) + "\\s*+=\\s*+)"\r
- + "(?:[^\r\n\\\\]++|\\\\(?:\r?\n|\r|.))*+$"; \r
+ + "(?:[^\r\n\\\\]++|\\\\(?:\r?\n|\r|.))*+$";\r
+ String oldContent = content;\r
content = content.replaceAll(regex, setting.getKey() + " = " + setting.getValue());\r
+ if (content.equals(oldContent)) {\r
+ // did not replace value because it does not exist in the file\r
+ // append new setting to content (issue-85)\r
+ content += "\n" + setting.getKey() + " = " + setting.getValue();\r
+ }\r
}\r
FileUtils.writeContent(propertiesFile, content);\r
// manually set the forceReload flag because not all JVMs support real\r