#19334 closed defect (fixed)
[PATCH] Upgrade to error_prone 2.4.0
Reported by: | Don-vip | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.06 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Follow-up of ticket:18755#comment:7
Now that error_prone works with recent versions of Java, we no longer need to patch it and can use it through Ivy.
Attached patch does it. New default rules require a lot of javadoc changes. Also the public -> protected change of abstract constructors should probably require a rebuild of all plugins.
The new version finds two critical bugs that need to be solved as well:
[javac] C:\SVN\josm\core\src\org\openstreetmap\josm\gui\preferences\imagery\ImageryProvidersPanel.java:414: warning: [ModifyCollectionInEnhancedForLoop] Modifying a collection while iterating over it in a loop may cause a ConcurrentModificationException to be thrown or lead to undefined behavior. [javac] removalEffect.accept(map.remove(i)); [javac] ^ [javac] (see https://errorprone.info/bugpattern/ModifyCollectionInEnhancedForLoop) [javac] C:\SVN\josm\core\src\org\openstreetmap\josm\data\validation\tests\DuplicateNode.java:191: warning: [ModifyCollectionInEnhancedForLoop] Modifying a collection while iterating over it in a loop may cause a ConcurrentModificationException to be thrown or lead to undefined behavior. [javac] typeMap.put(type, Boolean.TRUE); [javac] ^ [javac] (see https://errorprone.info/bugpattern/ModifyCollectionInEnhancedForLoop) [javac] 2 warnings
See https://errorprone.info/bugpattern/ModifyCollectionInEnhancedForLoop
Attachments (1)
Change History (21)
by , 5 years ago
Attachment: | 19334.diff added |
---|
comment:1 by , 5 years ago
comment:6 by , 5 years ago
The plugins failed to compile on JDK11 – https://josm.openstreetmap.de/jenkins/job/JOSM-Plugins/jdk=JDK11/1869/console
Fixed via [o35489]
Wow, that's great news! :-)