You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2023/01/14 16:52:57 UTC

[lucene] branch branch_9x updated: Update to error-prone 2.17 (#12056)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new f22fc96fd67 Update to error-prone 2.17 (#12056)
f22fc96fd67 is described below

commit f22fc96fd6781c41269724426e5042ece86f6d4c
Author: Robert Muir <rm...@apache.org>
AuthorDate: Sat Jan 14 11:38:39 2023 -0500

    Update to error-prone 2.17 (#12056)
---
 gradle/validation/error-prone.gradle                             | 9 ++++++++-
 .../apache/lucene/search/suggest/fst/FSTCompletionBuilder.java   | 2 +-
 versions.props                                                   | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/gradle/validation/error-prone.gradle b/gradle/validation/error-prone.gradle
index ef8ca778274..6eb852114f7 100644
--- a/gradle/validation/error-prone.gradle
+++ b/gradle/validation/error-prone.gradle
@@ -146,6 +146,7 @@ allprojects { prj ->
             '-Xep:IdentityHashMapBoxing:ERROR',
             // '-Xep:IgnoredPureGetter:OFF', // we don't use these annotations
             // '-Xep:Immutable:OFF', // we don't use this annotation
+            // '-Xep:ImpossibleNullComparison:OFF', // we don't use protobuf
             '-Xep:Incomparable:ERROR',
             // '-Xep:IncompatibleArgumentType:OFF', // we don't use this annotation
             // '-Xep:IncompatibleModifiers:OFF', // we don't use this annotation
@@ -173,6 +174,7 @@ allprojects { prj ->
             '-Xep:JUnitParameterMethodNotFound:ERROR',
             // '-Xep:JavaxInjectOnAbstractMethod:OFF', // we don't this annotation
             // '-Xep:JodaToSelf:OFF', // we don't use joda-time
+            // '-Xep:LenientFormatStringValidation:OFF' // we don't use these google libraries
             // '-Xep:LiteByteStringUtf8:OFF', // we don't use protobuf
             // '-Xep:LocalDateTemporalAmount:OFF', // we don't use LocalDate math
             '-Xep:LockOnBoxedPrimitive:ERROR',
@@ -255,6 +257,7 @@ allprojects { prj ->
 
             // On by Default : WARNING
 
+            // '-Xep:ASTHelpersSuggestions:OFF', // we don't use ASTHelpers
             // '-Xep:AlmostJavadoc:OFF', // noisy (e.g. commented-out code misinterpreted as javadocs)
             // '-Xep:AlreadyChecked:OFF', // TODO: there are problems
             // '-Xep:AmbiguousMethodReference:OFF',
@@ -315,6 +318,7 @@ allprojects { prj ->
             // '-Xep:ExtendingJUnitAssert:OFF', // noisy
             // '-Xep:ExtendsObject:OFF', // TODO: there are problems
             // '-Xep:FallThrough:OFF', // TODO: there are problems
+            // '-Xep:Finalize:OFF', // we use forbidden-apis for this (jdk-deprecated method)
             // '-Xep:Finally:OFF', // TODO: there are problems
             '-Xep:FloatCast:WARN',
             '-Xep:FloatingPointAssertionWithinEpsilon:WARN',
@@ -331,6 +335,7 @@ allprojects { prj ->
             // '-Xep:ImmutableEnumChecker:OFF', // noisy
             // '-Xep:InconsistentCapitalization:OFF', // TODO: there are problems
             // '-Xep:InconsistentHashCode:OFF', // noisy
+            // '-Xep:IgnoredPureGetter:OFF', // we don't use these google libraries
             '-Xep:IncorrectMainMethod:WARN',
             '-Xep:IncrementInForLoopAndHeader:WARN',
             '-Xep:InheritDoc:WARN',
@@ -382,7 +387,7 @@ allprojects { prj ->
             '-Xep:LongFloatConversion:WARN',
             '-Xep:LoopOverCharArray:WARN',
             '-Xep:MalformedInlineTag:WARN',
-            // '-Xep:MathAbsoluteRandom:OFF', // TODO: there are problems
+            // '-Xep:MathAbsoluteNegative:OFF', // TODO: there are problems
             // '-Xep:MemoizeConstantVisitorStateLookups:OFF', // we don't use this class
             // '-Xep:MissingCasesInEnumSwitch:OFF', // redundant with ECJ incompleteEnumSwitch/missingEnumCaseDespiteDefault
             // '-Xep:MissingFail:OFF', // TODO: there are problems
@@ -401,6 +406,7 @@ allprojects { prj ->
             // '-Xep:NarrowingCompoundAssignment:OFF', // noisy
             '-Xep:NegativeCharLiteral:WARN',
             '-Xep:NestedInstanceOfConditions:WARN',
+            // '-Xep:NewFileSystem:OFF', // we don't create new filesystems
             // '-Xep:NonAtomicVolatileUpdate:OFF', // TODO: there are problems
             // '-Xep:NonCanonicalType:OFF', // noisy
             '-Xep:NonOverridingEquals:WARN',
@@ -470,6 +476,7 @@ allprojects { prj ->
             // '-Xep:UnnecessaryMethodInvocationMatcher:OFF', // we don't use spring
             '-Xep:UnnecessaryMethodReference:WARN',
             // '-Xep:UnnecessaryParentheses:OFF', // noisy
+            // '-Xep:UnqualifiedYield:OFF', // javac takes care
             '-Xep:UnrecognisedJavadocTag:WARN',
             // '-Xep:UnsafeFinalization:OFF', // we don't use finalizers, deprecated for removal, fails build
             '-Xep:UnsafeReflectiveConstructionCast:WARN',
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionBuilder.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionBuilder.java
index 0b0ef0ce90e..ff8aa4d3bf7 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionBuilder.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionBuilder.java
@@ -35,7 +35,7 @@ import org.apache.lucene.util.fst.Util;
  *
  * <h2>Implementation details</h2>
  *
- * <p>The construction step in {@link #finalize()} works as follows:
+ * <p>The construction step in {@link #build()} works as follows:
  *
  * <ul>
  *   <li>A set of input terms and their buckets is given.
diff --git a/versions.props b/versions.props
index 1f5341bae6e..e283be41f2b 100644
--- a/versions.props
+++ b/versions.props
@@ -1,7 +1,7 @@
 com.carrotsearch.randomizedtesting:*=2.8.1
 com.carrotsearch:hppc=0.9.1
 com.carrotsearch:procfork=1.0.6
-com.google.errorprone:*=2.15.0
+com.google.errorprone:*=2.17.0
 com.ibm.icu:icu4j=70.1
 commons-codec:commons-codec=1.13
 io.sgr:s2-geometry-library-java=1.0.0