Changeset 18871 in josm for trunk/tools


Ignore:
Timestamp:
2023-10-16T19:03:11+02:00 (13 months ago)
Author:
taylor.smock
Message:

See #23218: Use newer error_prone versions when compiling on Java 11+

error_prone 2.11 dropped support for compiling with Java 8, although it still
supports compiling for Java 8. The "major" new check for us is NotJavadoc since
we used /** in quite a few places which were not javadoc.

Other "new" checks that are of interest:

  • AlreadyChecked: if (foo) { doFoo(); } else if (!foo) { doBar(); }
  • UnnecessaryStringBuilder: Avoid StringBuilder (Java converts + to StringBuilder behind-the-scenes, but may also do something else if it performs better)
  • NonApiType: Avoid specific interface types in function definitions
  • NamedLikeContextualKeyword: Avoid using restricted names for classes and methods
  • UnusedMethod: Unused private methods should be removed

This fixes most of the new error_prone issues and some SonarLint issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/ivy.xml

    r18857 r18871  
    3131        <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="4.7.3" conf="spotbugs->default"/>
    3232        <!-- errorprone->default -->
    33         <dependency org="com.google.errorprone" name="error_prone_core" rev="2.10.0" conf="errorprone->default"/>
     33        <dependency org="com.google.errorprone" name="error_prone_core" rev="${versions.error_prone}" conf="errorprone->default"/>
    3434        <!-- errorprone->default -->
    3535        <dependency org="com.google.errorprone" name="javac" rev="9+181-r4173-1" conf="errorprone_javac->default"/>
Note: See TracChangeset for help on using the changeset viewer.