if (type != that.type) {
return false;
}
- if (coefficient != null ? !coefficient.equals(that.coefficient) : that.coefficient != null) {
+ if ((coefficient != null) ? !coefficient.equals(that.coefficient) : (that.coefficient != null)) {
return false;
}
- return offset != null ? offset.equals(that.offset) : that.offset == null;
+ return (offset != null) ? offset.equals(that.offset) : (that.offset == null);
}
@Override
*/
package org.sonar.api.batch.sensor.coverage;
-import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import org.sonar.api.measures.Metric;
+import static java.util.Arrays.asList;
import static org.sonar.api.measures.CoreMetrics.CONDITIONS_BY_LINE;
import static org.sonar.api.measures.CoreMetrics.CONDITIONS_TO_COVER;
import static org.sonar.api.measures.CoreMetrics.COVERAGE_LINE_HITS_DATA;
this.uncoveredConditions = uncoveredConditions;
this.coveredConditionsByLine = coveredConditionsByLine;
this.conditionsByLine = conditionsByLine;
- this.all = Collections
- .unmodifiableSet(new LinkedHashSet<>(Arrays.asList(linesToCover, uncoveredLines, lineHitsData, conditionsToCover, uncoveredConditions, coveredConditionsByLine, conditionsByLine)));
+ this.all = Collections.unmodifiableSet(new LinkedHashSet<>(
+ asList(linesToCover, uncoveredLines, lineHitsData, conditionsToCover, uncoveredConditions, coveredConditionsByLine, conditionsByLine)));
}
public Set<Metric> allMetrics() {
import java.util.List;
import static java.util.Arrays.asList;
+import static java.util.Collections.unmodifiableList;
/**
* @since 3.6
/**
* All the supported severity values, ordered from {@link #INFO} to {@link #BLOCKER}.
*/
- public static final List<String> ALL = asList(INFO, MINOR, MAJOR, CRITICAL, BLOCKER);
+ public static final List<String> ALL = unmodifiableList(asList(INFO, MINOR, MAJOR, CRITICAL, BLOCKER));
private Severity() {
// utility