Skip to content

Commit

Permalink
Fixed error where the configuration of project/global rules didn't st…
Browse files Browse the repository at this point in the history
…ick. The problem was caused due to looking for a JSON key on the JSON top level instead of in the sub object.
  • Loading branch information
JohanVikman committed Jan 29, 2014
1 parent e3a5d4d commit ecde717
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -190,10 +190,10 @@ public LogParserPublisher newInstance(StaplerRequest req,
if (useProjectRuleJSON != null) {
configuredUseProjectRule = useProjectRuleJSON.getBoolean("value");

if (!configuredUseProjectRule && json.containsKey("parsingRulesPath")) {
configuredParsingRulesPath = json.getString("parsingRulesPath");
} else if (configuredUseProjectRule && json.containsKey("projectRulePath")) {
configuredProjectRulePath = json.getString("projectRulePath");
if (!configuredUseProjectRule && useProjectRuleJSON.containsKey("parsingRulesPath")) {
configuredParsingRulesPath = useProjectRuleJSON.getString("parsingRulesPath");
} else if (configuredUseProjectRule && useProjectRuleJSON.containsKey("projectRulePath")) {
configuredProjectRulePath = useProjectRuleJSON.getString("projectRulePath");
}
}
return new LogParserPublisher(json.getBoolean("unstableOnWarning"),
Expand Down

0 comments on commit ecde717

Please sign in to comment.