Changeset 10218 in josm
- Timestamp:
- 2016-05-15T18:36:50+02:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.settings/edu.umd.cs.findbugs.core.prefs
r8656 r10218 1 1 #FindBugs User Preferences 2 #S at Aug 01 23:18:50 CEST 20152 #Sun May 15 18:27:24 CEST 2016 3 3 cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud 4 4 detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true … … 10 10 detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true 11 11 detectorBooleanReturnNull=BooleanReturnNull|true 12 detectorCallToUnsupportedMethod=CallToUnsupportedMethod| false12 detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true 13 13 detectorCheckExpectedWarnings=CheckExpectedWarnings|false 14 14 detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true … … 19 19 detectorConfusedInheritance=ConfusedInheritance|true 20 20 detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true 21 detectorCovariantArrayAssignment=CovariantArrayAssignment| false21 detectorCovariantArrayAssignment=CovariantArrayAssignment|true 22 22 detectorCrossSiteScripting=CrossSiteScripting|true 23 23 detectorDefaultEncodingDetector=DefaultEncodingDetector|true … … 81 81 detectorIncompatMask=IncompatMask|true 82 82 detectorInconsistentAnnotations=InconsistentAnnotations|true 83 detectorInefficientIndexOf=InefficientIndexOf| false84 detectorInefficientInitializationInsideLoop=InefficientInitializationInsideLoop| false85 detectorInefficientMemberAccess=InefficientMemberAccess| false83 detectorInefficientIndexOf=InefficientIndexOf|true 84 detectorInefficientInitializationInsideLoop=InefficientInitializationInsideLoop|true 85 detectorInefficientMemberAccess=InefficientMemberAccess|true 86 86 detectorInefficientToArray=InefficientToArray|true 87 87 detectorInfiniteLoop=InfiniteLoop|true … … 108 108 detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true 109 109 detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true 110 detectorPublicSemaphores=PublicSemaphores| false110 detectorPublicSemaphores=PublicSemaphores|true 111 111 detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true 112 112 detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true … … 131 131 detectorUnnecessaryMath=UnnecessaryMath|true 132 132 detectorUnreadFields=UnreadFields|true 133 detectorUselessSubclassMethod=UselessSubclassMethod| false133 detectorUselessSubclassMethod=UselessSubclassMethod|true 134 134 detectorVarArgsProblems=VarArgsProblems|true 135 135 detectorVolatileUsage=VolatileUsage|true … … 137 137 detectorWrongMapIterator=WrongMapIterator|true 138 138 detectorXMLFactoryBypass=XMLFactoryBypass|true 139 detector_threshold= 2139 detector_threshold=3 140 140 effort=max 141 141 excludefilter0=tools/findbugs/josm-filter.xml|true 142 filter_settings= Medium|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false|16142 filter_settings=Low|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false|20 143 143 filter_settings_neg=NOISE| 144 144 run_at_full_build=true -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/NameMismatchTest.java
r8624 r10218 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertSame;6 5 7 6 import java.util.List; … … 38 37 public void test0() { 39 38 final List<TestError> errors = test("node name:de=Europa"); 40 assert Same(1, errors.size());39 assertEquals(1, errors.size()); 41 40 assertEquals("A name is missing, even though name:* exists.", errors.get(0).getMessage()); 42 41 } … … 48 47 public void test1() { 49 48 final List<TestError> errors = test("node name=Europe name:de=Europa"); 50 assert Same(1, errors.size());49 assertEquals(1, errors.size()); 51 50 assertEquals("Missing name:*=Europe. Add tag with correct language key.", errors.get(0).getDescription()); 52 51 } … … 58 57 public void test2() { 59 58 final List<TestError> errors = test("node name=Europe name:de=Europa name:en=Europe"); 60 assert Same(0, errors.size());59 assertEquals(0, errors.size()); 61 60 } 62 61 … … 68 67 List<TestError> errors; 69 68 errors = test("node \"name\"=\"Italia - Italien - Italy\""); 70 assert Same(0, errors.size());69 assertEquals(0, errors.size()); 71 70 errors = test("node name=\"Italia - Italien - Italy\" name:it=Italia"); 72 assert Same(2, errors.size());71 assertEquals(2, errors.size()); 73 72 errors = test("node name=\"Italia - Italien - Italy\" name:it=Italia name:de=Italien"); 74 assert Same(1, errors.size());73 assertEquals(1, errors.size()); 75 74 assertEquals("Missing name:*=Italy. Add tag with correct language key.", errors.get(0).getDescription()); 76 75 errors = test("node name=\"Italia - Italien - Italy\" name:it=Italia name:de=Italien name:en=Italy"); 77 assert Same(0, errors.size());76 assertEquals(0, errors.size()); 78 77 } 79 78 } -
trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java
r9489 r10218 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertSame;6 5 7 6 import java.io.IOException; … … 68 67 System.out.println("p3: "+DefaultNameFormatter.getInstance().format(p3)+" - "+p3); 69 68 70 assert Same(comparator.compare(p1, p2), -1); // p1 < p271 assert Same(comparator.compare(p2, p1), 1); // p2 > p169 assertEquals(comparator.compare(p1, p2), -1); // p1 < p2 70 assertEquals(comparator.compare(p2, p1), 1); // p2 > p1 72 71 73 assert Same(comparator.compare(p1, p3), -1); // p1 < p374 assert Same(comparator.compare(p3, p1), 1); // p3 > p175 assert Same(comparator.compare(p2, p3), 1); // p2 > p376 assert Same(comparator.compare(p3, p2), -1); // p3 < p272 assertEquals(comparator.compare(p1, p3), -1); // p1 < p3 73 assertEquals(comparator.compare(p3, p1), 1); // p3 > p1 74 assertEquals(comparator.compare(p2, p3), 1); // p2 > p3 75 assertEquals(comparator.compare(p3, p2), -1); // p3 < p2 77 76 78 77 Relation[] relations = new ArrayList<>(ds.getRelations()).toArray(new Relation[0]); -
trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java
r9942 r10218 4 4 import static org.junit.Assert.assertEquals; 5 5 import static org.junit.Assert.assertNotNull; 6 import static org.junit.Assert.assertSame;7 6 import static org.junit.Assert.assertTrue; 8 7 … … 69 68 for (String file : new String[]{"osm.jos", "osm.joz"}) { 70 69 List<Layer> layers = testRead(file); 71 assert Same(layers.size(), 1);70 assertEquals(layers.size(), 1); 72 71 assertTrue(layers.get(0) instanceof OsmDataLayer); 73 72 OsmDataLayer osm = (OsmDataLayer) layers.get(0); … … 85 84 for (String file : new String[]{"gpx.jos", "gpx.joz", "nmea.jos"}) { 86 85 List<Layer> layers = testRead(file); 87 assert Same(layers.size(), 1);86 assertEquals(layers.size(), 1); 88 87 assertTrue(layers.get(0) instanceof GpxLayer); 89 88 GpxLayer gpx = (GpxLayer) layers.get(0); … … 100 99 public void testReadGpxAndMarker() throws IOException, IllegalDataException { 101 100 List<Layer> layers = testRead("gpx_markers.joz"); 102 assert Same(layers.size(), 2);101 assertEquals(layers.size(), 2); 103 102 GpxLayer gpx = null; 104 103 MarkerLayer marker = null; … … 124 123 public void testReadImage() throws IOException, IllegalDataException { 125 124 final List<Layer> layers = testRead("bing.jos"); 126 assert Same(layers.size(), 1);125 assertEquals(layers.size(), 1); 127 126 assertTrue(layers.get(0) instanceof ImageryLayer); 128 127 final ImageryLayer image = (ImageryLayer) layers.get(0); … … 145 144 } 146 145 final List<Layer> layers = testRead("notes.joz"); 147 assert Same(layers.size(), 1);146 assertEquals(layers.size(), 1); 148 147 assertTrue(layers.get(0) instanceof NoteLayer); 149 148 final NoteLayer layer = (NoteLayer) layers.get(0);
Note:
See TracChangeset
for help on using the changeset viewer.