ldore commented on Bug JENKINS-6425

Changing the method hudson.plugins.cobertura.targets.CoverageResult.CoverageResult.getMetrics (Near line 326 in CoverageResult.java) to

public Set<CoverageMetric> getMetrics() {
    if (aggregateResults.keySet().size() != 0) {
      return Collections.unmodifiableSet(EnumSet.copyOf(aggregateResults.keySet()));
    }
    else {
      return Collections.unmodifiableSet(new TreeSet<CoverageMetric>());
    }
  }

makes the exception disappear. I'm not sure this is the correct fix, though:
Could the aggregateResults be emptied between the size check and the copyOf call ?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to