Skip to content
Snippets Groups Projects
Commit 1b08ec0c authored by srosse's avatar srosse
Browse files

no-jira: fix NPE in score calculation

parent 208e655f
No related branches found
No related tags found
No related merge requests found
...@@ -111,11 +111,11 @@ public class ScoreCalculator implements Serializable { ...@@ -111,11 +111,11 @@ public class ScoreCalculator implements Serializable {
* @return * @return
*/ */
public String getScoreExpressionFromEasyModeConfiguration() { public String getScoreExpressionFromEasyModeConfiguration() {
if (getSumOfScoreNodes() != null && getSumOfScoreNodes().size() > 0) { if (getSumOfScoreNodes() != null && !getSumOfScoreNodes().isEmpty()) {
switch (scoreType) { if(scoreType == null || SCORE_TYPE_SUM.equals(scoreType)) {
case SCORE_TYPE_SUM: return getSumScoreExpression(); return getSumScoreExpression();
case SCORE_TYPE_AVG: return getAvgScoreExpression(); } else if(SCORE_TYPE_AVG.equals(scoreType)) {
default: // return getAvgScoreExpression();
} }
} }
return null; return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment