diff --git a/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs b/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs index e5394d16d..815f01e20 100644 --- a/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs +++ b/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs @@ -33,7 +33,7 @@ sp_cleanup.organize_imports=true sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java index 7e52a2059..dd5da8ce1 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java @@ -16,7 +16,7 @@ import java.util.Map; -import org.jacoco.core.analysis.ISourceFileCoverage; +import org.jacoco.core.analysis.ISourceNode; import org.jacoco.core.internal.flow.LabelInfo; import org.junit.Before; import org.junit.Test; @@ -53,7 +53,7 @@ public void current_line_number_should_be_applied_to_instructions() { builder.addInstruction(i4); Map map = builder.getInstructions(); - assertEquals(ISourceFileCoverage.UNKNOWN_LINE, map.get(i1).getLine()); + assertEquals(ISourceNode.UNKNOWN_LINE, map.get(i1).getLine()); assertEquals(10, map.get(i2).getLine()); assertEquals(10, map.get(i3).getLine()); assertEquals(20, map.get(i4).getLine()); diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java index 1c6768cc4..0b5a9117d 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java @@ -19,7 +19,7 @@ import java.util.HashSet; import java.util.Map; -import org.jacoco.core.analysis.ISourceFileCoverage; +import org.jacoco.core.analysis.ISourceNode; import org.junit.Before; import org.junit.Test; import org.objectweb.asm.Opcodes; @@ -205,15 +205,15 @@ public void should_replace_branches_with_merged_instructions() { @Test public void should_work_without_lines() { - addInsn(ISourceFileCoverage.UNKNOWN_LINE, false); - addInsn(ISourceFileCoverage.UNKNOWN_LINE, false); - addInsn(ISourceFileCoverage.UNKNOWN_LINE, true); + addInsn(ISourceNode.UNKNOWN_LINE, false); + addInsn(ISourceNode.UNKNOWN_LINE, false); + addInsn(ISourceNode.UNKNOWN_LINE, true); MethodCoverageCalculator c = new MethodCoverageCalculator(instructions); c.calculate(coverage); - assertEquals(ISourceFileCoverage.UNKNOWN_LINE, coverage.getFirstLine()); - assertEquals(ISourceFileCoverage.UNKNOWN_LINE, coverage.getLastLine()); + assertEquals(ISourceNode.UNKNOWN_LINE, coverage.getFirstLine()); + assertEquals(ISourceNode.UNKNOWN_LINE, coverage.getLastLine()); assertEquals(CounterImpl.getInstance(2, 1), coverage.getInstructionCounter()); } diff --git a/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs b/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs index 072b187e4..a3dee78c9 100644 --- a/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs +++ b/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs @@ -34,7 +34,7 @@ sp_cleanup.organize_imports=true sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java index ee8b7c6f2..f6a7c5d95 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java @@ -20,7 +20,6 @@ import java.util.Map.Entry; import java.util.Set; -import org.jacoco.core.analysis.ISourceFileCoverage; import org.jacoco.core.analysis.ISourceNode; import org.jacoco.core.internal.analysis.filter.IFilterOutput; import org.objectweb.asm.tree.AbstractInsnNode; @@ -122,8 +121,8 @@ private void applyReplacements() { private void ensureCapacity(final MethodCoverageImpl coverage) { // Determine line range: - int firstLine = ISourceFileCoverage.UNKNOWN_LINE; - int lastLine = ISourceFileCoverage.UNKNOWN_LINE; + int firstLine = ISourceNode.UNKNOWN_LINE; + int lastLine = ISourceNode.UNKNOWN_LINE; for (final Entry entry : instructions .entrySet()) { if (!ignored.contains(entry.getKey())) { diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java index 37c3ac3b0..ecf6dbac4 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java @@ -18,7 +18,6 @@ import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; -import org.objectweb.asm.tree.InsnNode; import org.objectweb.asm.tree.JumpInsnNode; import org.objectweb.asm.tree.LabelNode; import org.objectweb.asm.tree.LookupSwitchInsnNode; @@ -45,7 +44,7 @@ public void filter(final MethodNode methodNode, private static class Matcher extends AbstractMatcher { void match(final AbstractInsnNode start, final IFilterOutput output) { - if (start.getType() != InsnNode.LABEL) { + if (start.getType() != AbstractInsnNode.LABEL) { return; } cursor = start; diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java index 5c22fc6ce..1a60aef83 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java @@ -13,7 +13,6 @@ package org.jacoco.report.internal.html.table; import java.io.IOException; -import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Comparator; import java.util.List; @@ -55,7 +54,7 @@ public class BarColumn implements IColumnRenderer { */ public BarColumn(final CounterEntity entity, final Locale locale) { this.entity = entity; - this.integerFormat = DecimalFormat.getIntegerInstance(locale); + this.integerFormat = NumberFormat.getIntegerInstance(locale); this.comparator = new TableItemComparator( CounterComparator.MISSEDITEMS.reverse().on(entity).second( CounterComparator.TOTALITEMS.reverse().on(entity))); diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java index 308f47c60..949433495 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java @@ -13,7 +13,6 @@ package org.jacoco.report.internal.html.table; import java.io.IOException; -import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Comparator; import java.util.List; @@ -114,7 +113,7 @@ protected int getValue(final ICounter counter) { protected CounterColumn(final CounterEntity entity, final Locale locale, final Comparator comparator) { this.entity = entity; - this.integerFormat = DecimalFormat.getIntegerInstance(locale); + this.integerFormat = NumberFormat.getIntegerInstance(locale); this.comparator = new TableItemComparator(comparator); }