This is an automated email from the ASF dual-hosted git repository.
krisden pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 0056e82a30d Update dependency
com.google.errorprone:error_prone_annotations to v2.22.0 (#1701)
0056e82a30d is described below
commit 0056e82a30d6239af4a80726527ca912a5ca3d31
Author: Solr Bot <[email protected]>
AuthorDate: Mon Oct 2 18:54:47 2023 +0200
Update dependency com.google.errorprone:error_prone_annotations to v2.22.0
(#1701)
* Update dependency com.google.errorprone:error_prone_annotations to v2.22.0
Co-authored-by: Kevin Risden <[email protected]>
---
gradle/validation/error-prone.gradle | 24 +++++++++-
.../java/org/apache/solr/cli/SimplePostTool.java | 1 -
.../src/java/org/apache/solr/core/SolrCore.java | 8 ++--
.../apache/solr/handler/ReplicationHandler.java | 9 ++--
.../apache/solr/handler/admin/PrepRecoveryOp.java | 7 +--
.../solr/handler/component/FieldFacetStats.java | 1 -
.../org/apache/solr/metrics/SolrMetricManager.java | 5 +-
.../org/apache/solr/request/json/ObjectUtil.java | 1 -
.../src/java/org/apache/solr/schema/PointType.java | 2 +-
.../solr/search/CollapsingQParserPlugin.java | 4 +-
.../apache/solr/search/facet/FacetFieldMerger.java | 4 +-
.../search/facet/FacetFieldProcessorByArrayDV.java | 2 +-
.../search/facet/FacetRequestSortedMerger.java | 2 +-
.../solr/security/SolrLogAuditLoggerPlugin.java | 54 +++++++++++-----------
.../solr/servlet/cache/HttpCacheHeaderUtil.java | 2 -
.../src/java/org/apache/solr/update/PeerSync.java | 2 +-
.../apache/solr/core/TestConfigSetImmutable.java | 2 +-
...stributedFacetSimpleRefinementLongTailTest.java | 27 +++++------
.../FieldMutatingUpdateProcessorTest.java | 1 +
.../error_prone_annotations-2.18.0.jar.sha1 | 1 -
.../error_prone_annotations-2.22.0.jar.sha1 | 1 +
.../read/ReductionCheckedDataReader.java | 2 +-
.../reservation/read/ReductionDataArrayReader.java | 2 +-
.../extraction/ExtractingDocumentLoader.java | 19 ++++----
.../src/test/org/apache/hadoop/fs/FileUtil.java | 4 +-
.../solr/hdfs/store/blockcache/BlockCacheTest.java | 12 ++---
.../src/java/org/apache/solr/ltr/LTRRescorer.java | 2 +-
.../solr/client/solrj/impl/Http2SolrClient.java | 6 ++-
.../solr/client/solrj/impl/HttpClientUtil.java | 14 +++---
.../solr/client/solrj/impl/LBSolrClient.java | 2 +-
.../solr/client/solrj/impl/XMLResponseParser.java | 2 +-
.../java/org/apache/solr/common/cloud/Slice.java | 2 +-
.../org/apache/solr/common/util/JavaBinCodec.java | 2 +-
.../client/solrj/impl/Http2SolrClientTest.java | 2 +-
.../apache/solr/cloud/MiniSolrCloudCluster.java | 2 +-
versions.lock | 2 +-
versions.props | 2 +-
37 files changed, 125 insertions(+), 112 deletions(-)
diff --git a/gradle/validation/error-prone.gradle
b/gradle/validation/error-prone.gradle
index 9c80fea0c47..d2800242425 100644
--- a/gradle/validation/error-prone.gradle
+++ b/gradle/validation/error-prone.gradle
@@ -85,6 +85,7 @@ allprojects { prj ->
// '-Xep:AutoValueConstructorOrderChecker:OFF', // we don't use
autovalue
'-Xep:BadAnnotationImplementation:ERROR',
'-Xep:BadShiftAmount:ERROR',
+ '-Xep:BanClassLoader:ERROR',
'-Xep:BanJNDI:ERROR', // todo - implement with forbidden APIs
instead?
'-Xep:BoxedPrimitiveEquality:ERROR',
// '-Xep:BundleDeserializationCast:OFF', // we don't use android
@@ -104,6 +105,7 @@ allprojects { prj ->
'-Xep:DangerousLiteralNull:ERROR',
'-Xep:DeadException:ERROR',
'-Xep:DeadThread:ERROR',
+ '-Xep:DereferenceWithNullBranch:ERROR',
'-Xep:DiscardedPostfixExpression:ERROR',
// '-Xep:DoNotCall:OFF', // we don't use this annotation
'-Xep:DoNotMock:ERROR',
@@ -262,6 +264,7 @@ allprojects { prj ->
'-Xep:AssertThrowsMultipleStatements:WARN',
'-Xep:AssertionFailureIgnored:WARN',
'-Xep:AssistedInjectAndInjectOnSameConstructor:WARN',
+ '-Xep:AttemptedNegativeZero:WARN',
// '-Xep:AutoValueFinalMethods:OFF', // we don't use autovalue
// '-Xep:AutoValueImmutableFields:OFF', // we don't use autovalue
// '-Xep:AutoValueSubclassLeaked:OFF', // we don't use autovalue
@@ -284,6 +287,7 @@ allprojects { prj ->
'-Xep:ClassCanBeStatic:WARN',
'-Xep:ClassNewInstance:WARN',
// '-Xep:CloseableProvides:OFF', // we don't use this annotation
+ '-Xep:ClosingStandardOutputStreams:WARN',
'-Xep:CollectionUndefinedEquality:WARN',
'-Xep:CollectorShouldNotUseState:WARN',
'-Xep:ComparableAndComparator:WARN',
@@ -299,6 +303,7 @@ allprojects { prj ->
// '-Xep:DoNotCallSuggester:OFF', // we don't use this annotation
// '-Xep:DoNotClaimAnnotations:OFF', // we don't use this
annotation
// '-Xep:DoNotMockAutoValue:OFF', // we don't use autovalue
+ // '-Xep:DoNotUseRuleChain:OFF', // todo could be fixed but not
easy
// '-Xep:DoubleCheckedLocking:OFF', // todo check if useful or
comment why not
'-Xep:EmptyBlockTag:WARN',
// '-Xep:EmptyCatch:OFF', // todo check if useful or comment why
not - might be handled by ECJ?
@@ -325,6 +330,7 @@ allprojects { prj ->
// '-Xep:FutureReturnValueIgnored:OFF', // todo there are problems
that should be fixed
'-Xep:GetClassOnEnum:WARN',
'-Xep:HidingField:WARN',
+ '-Xep:ICCProfileGetInstance:WARN',
'-Xep:IdentityHashMapUsage:WARN',
// '-Xep:ImmutableAnnotationChecker:OFF', // we don't use this
annotation
'-Xep:ImmutableEnumChecker:WARN',
@@ -343,6 +349,7 @@ allprojects { prj ->
// '-Xep:InlineMeInliner:OFF', // we don't use this annotation
// '-Xep:InlineMeSuggester:OFF', // We don't use this annotation
// '-Xep:InputStreamSlowMultibyteRead:OFF', // todo check if
useful or comment why not
+ '-Xep:InlineTrivialConstant:WARN',
'-Xep:InstanceOfAndCastMatchWrongType:WARN',
'-Xep:IntLongMath:WARN',
// '-Xep:InvalidBlockTag:OFF', // this is needed for tags like
lucene.internal
@@ -379,6 +386,7 @@ allprojects { prj ->
'-Xep:LiteEnumValueOf:WARN',
'-Xep:LiteProtoToString:WARN',
'-Xep:LockNotBeforeTry:WARN',
+ '-Xep:LockOnNonEnclosingClassLiteral:WARN',
'-Xep:LogicalAssignment:WARN',
'-Xep:LongDoubleConversion:WARN',
'-Xep:LongFloatConversion:WARN',
@@ -390,25 +398,32 @@ allprojects { prj ->
'-Xep:MissingFail:WARN',
'-Xep:MissingImplementsComparable:WARN',
'-Xep:MissingOverride:WARN',
+ // '-Xep:MissingRefasterAnnotation:OFF', // don't use Refaster
// '-Xep:MissingSummary:OFF', // style preference that we don't
want to enforce
// '-Xep:MixedMutabilityReturnType:OFF', // todo check if useful
or comment why not
'-Xep:MockNotUsedInProduction:WARN',
'-Xep:ModifiedButNotUsed:WARN',
'-Xep:ModifyCollectionInEnhancedForLoop:WARN',
'-Xep:ModifySourceCollectionInStream:WARN',
+ '-Xep:MultimapKeys:WARN',
'-Xep:MultipleParallelOrSequentialCalls:WARN',
'-Xep:MultipleUnaryOperatorsInMethodCall:WARN',
+ // '-Xep:MutableGuiceModule:OFF', // we don't use guice
'-Xep:MutablePublicArray:WARN',
+ '-Xep:NamedLikeContextualKeyword:WARN',
'-Xep:NarrowCalculation:WARN',
'-Xep:NarrowingCompoundAssignment:WARN',
// '-Xep:NegativeCharLiteral:OFF', // todo check if useful or
comment why not
'-Xep:NestedInstanceOfConditions:WARN',
'-Xep:NewFileSystem:WARN',
+ //'-Xep:NonApiType:OFF', // todo could be fixed but lots of changes
// '-Xep:NonAtomicVolatileUpdate:OFF', // todo check if useful or
comment why not
'-Xep:NonCanonicalType:WARN',
'-Xep:NonOverridingEquals:WARN',
+ '-Xep:NotJavadoc:WARN',
'-Xep:NullOptional:WARN',
// '-Xep:NullableConstructor:OFF', // we don't use this annotation
+ '-Xep:NullableOptional:WARN',
// '-Xep:NullablePrimitive:OFF', // we don't use this annotation
// '-Xep:NullablePrimitiveArray:OFF', // we don't use this
annotation
// '-Xep:NullableVoid:OFF', // we don't use this annotation
@@ -420,9 +435,10 @@ allprojects { prj ->
'-Xep:OptionalNotPresent:WARN',
'-Xep:OrphanedFormatString:WARN',
// '-Xep:OutlineNone:OFF', // we don't use gwt
+ '-Xep:OverridingMethodInconsistentArgumentNamesChecker:WARN',
'-Xep:OverrideThrowableToString:WARN',
'-Xep:Overrides:WARN',
- '-Xep:OverridesGuiceInjectableMethod:WARN',
+ // '-Xep:OverridesGuiceInjectableMethod:OFF', // we don't use guice
'-Xep:ParameterName:WARN',
'-Xep:PreconditionsCheckNotNullRepeated:WARN',
'-Xep:PrimitiveAtomicReference:WARN',
@@ -434,6 +450,7 @@ allprojects { prj ->
'-Xep:ReachabilityFenceUsage:WARN',
'-Xep:ReferenceEquality:WARN',
'-Xep:RethrowReflectiveOperationExceptionAsLinkageError:WARN',
+ '-Xep:ReturnAtTheEndOfVoidFunction:WARN',
'-Xep:ReturnFromVoid:WARN',
'-Xep:RobolectricShadowDirectlyOn:WARN',
'-Xep:RxReturnValueIgnored:WARN',
@@ -446,6 +463,7 @@ allprojects { prj ->
'-Xep:StaticMockMember:WARN',
// '-Xep:StreamResourceLeak:OFF', // todo check if useful or
comment why not
'-Xep:StreamToIterable:WARN',
+ // '-Xep:StringCaseLocaleUsage:OFF', // we have forbiddenapis for
that
// '-Xep:StringSplitter:OFF', // todo check if useful or comment
why not - might be able to use forbidden-apis for this?
// '-Xep:SwigMemoryLeak:OFF', // we don't use swig
// '-Xep:SynchronizeOnNonFinalField:OFF', // todo check if useful
or comment why not
@@ -457,6 +475,7 @@ allprojects { prj ->
'-Xep:ToStringReturnsNull:WARN',
// '-Xep:TruthAssertExpected:OFF', // we don't use truth
// '-Xep:TruthConstantAsserts:OFF', // we don't use truth
+ // '-Xep:TruthContainsExactlyElementsInUsage:OFF', // we don't use
truth
// '-Xep:TruthGetOrDefault:OFF', // we don't use truth
// '-Xep:TruthIncompatibleType:OFF', // we don't use truth
'-Xep:TypeEquals:WARN',
@@ -468,11 +487,14 @@ allprojects { prj ->
'-Xep:UnescapedEntity:WARN',
// '-Xep:UnicodeEscape:OFF', // can't enable since Lucene/Solr
tests use unicode a bunch
// '-Xep:UnnecessaryAssignment:OFF', // we don't use these
annotations
+ '-Xep:UnnecessaryAsync:WARN',
'-Xep:UnnecessaryLambda:WARN',
'-Xep:UnnecessaryLongToIntConversion:WARN',
'-Xep:UnnecessaryMethodInvocationMatcher:WARN',
'-Xep:UnnecessaryMethodReference:WARN',
// '-Xep:UnnecessaryParentheses:OFF', // style preference that we
don't want to enforce
+ '-Xep:UnnecessaryStringBuilder:WARN',
+ // '-Xep:UnnecessaryTestMethodPrefix:OFF', // style preference
that we don't want to enforce
// '-Xep:UnqualifiedYield:OFF', // javac takes care
'-Xep:UnrecognisedJavadocTag:WARN',
'-Xep:UnsafeFinalization:WARN',
diff --git a/solr/core/src/java/org/apache/solr/cli/SimplePostTool.java
b/solr/core/src/java/org/apache/solr/cli/SimplePostTool.java
index 6def73ad789..1c4ceaba9e8 100644
--- a/solr/core/src/java/org/apache/solr/cli/SimplePostTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/SimplePostTool.java
@@ -409,7 +409,6 @@ public class SimplePostTool {
} catch (MalformedURLException e) {
fatal("Wrong URL trying to append /extract to " + solrUrl);
}
- return;
}
private void doStdinMode() {
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java
b/solr/core/src/java/org/apache/solr/core/SolrCore.java
index f5e28b34aa0..cb741cc97b6 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -3052,10 +3052,10 @@ public class SolrCore implements SolrInfoBean,
Closeable {
try {
m.put(
"xlsx",
- (QueryResponseWriter)
-
Class.forName("org.apache.solr.handler.extraction.XLSXResponseWriter")
- .getConstructor()
- .newInstance());
+
Class.forName("org.apache.solr.handler.extraction.XLSXResponseWriter")
+ .asSubclass(QueryResponseWriter.class)
+ .getDeclaredConstructor()
+ .newInstance());
} catch (Exception e) {
// don't worry; extraction module not in class path
}
diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
index ab40ff02543..096f81ee492 100644
--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -1804,11 +1804,10 @@ public class ReplicationHandler extends
RequestHandlerBase
public static final String LEADER_URL = "leaderUrl";
- @Deprecated
/**
- * @deprecated: Only used for backwards compatibility. Use {@link
#LEADER_URL}
+ * @deprecated Only used for backwards compatibility. Use {@link #LEADER_URL}
*/
- public static final String LEGACY_LEADER_URL = "masterUrl";
+ @Deprecated public static final String LEGACY_LEADER_URL = "masterUrl";
public static final String FETCH_FROM_LEADER = "fetchFromLeader";
@@ -1817,11 +1816,11 @@ public class ReplicationHandler extends
RequestHandlerBase
// loss
public static final String SKIP_COMMIT_ON_LEADER_VERSION_ZERO =
"skipCommitOnLeaderVersionZero";
- @Deprecated
/**
- * @deprecated: Only used for backwards compatibility. Use {@link
+ * @deprecated Only used for backwards compatibility. Use {@link
* #SKIP_COMMIT_ON_LEADER_VERSION_ZERO}
*/
+ @Deprecated
public static final String LEGACY_SKIP_COMMIT_ON_LEADER_VERSION_ZERO =
"skipCommitOnMasterVersionZero";
diff --git
a/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java
b/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java
index df9453d3da6..d56dbb6506f 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java
@@ -20,7 +20,6 @@ package org.apache.solr.handler.admin;
import java.lang.invoke.MethodHandles;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicReference;
import org.apache.solr.cloud.CloudDescriptor;
import org.apache.solr.cloud.ZkController.NotInClusterStateException;
import org.apache.solr.cloud.ZkShardTerms;
@@ -75,7 +74,6 @@ class PrepRecoveryOp implements CoreAdminHandler.CoreAdminOp {
collectionName =
core.getCoreDescriptor().getCloudDescriptor().getCollectionName();
cloudDescriptor = core.getCoreDescriptor().getCloudDescriptor();
}
- AtomicReference<String> errorMessage = new AtomicReference<>();
try {
coreContainer
.getZkController()
@@ -201,9 +199,8 @@ class PrepRecoveryOp implements
CoreAdminHandler.CoreAdminOp {
return false;
});
} catch (TimeoutException | InterruptedException e) {
- String error = errorMessage.get();
- if (error == null) error = "Timeout waiting for collection state.";
- throw new NotInClusterStateException(ErrorCode.SERVER_ERROR, error);
+ throw new NotInClusterStateException(
+ ErrorCode.SERVER_ERROR, "Timeout waiting for collection state.");
}
}
}
diff --git
a/solr/core/src/java/org/apache/solr/handler/component/FieldFacetStats.java
b/solr/core/src/java/org/apache/solr/handler/component/FieldFacetStats.java
index 8c0201be2d0..2b0926ba2ee 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/FieldFacetStats.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/FieldFacetStats.java
@@ -190,6 +190,5 @@ public class FieldFacetStats {
}
}
}
- return;
}
}
diff --git a/solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
b/solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
index bd63e9e8a22..fa1034797c8 100644
--- a/solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
+++ b/solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
@@ -897,7 +897,7 @@ public class SolrMetricManager {
if (name.startsWith(REGISTRY_NAME_PREFIX)) {
return name;
} else {
- return new StringBuilder(REGISTRY_NAME_PREFIX).append(name).toString();
+ return REGISTRY_NAME_PREFIX + name;
}
}
@@ -912,8 +912,7 @@ public class SolrMetricManager {
*/
public static String getRegistryName(SolrInfoBean.Group group, String...
names) {
String fullName;
- String prefix =
- new
StringBuilder(REGISTRY_NAME_PREFIX).append(group.name()).append('.').toString();
+ String prefix = REGISTRY_NAME_PREFIX + group.name() + '.';
// check for existing prefix and group
if (names != null && names.length > 0 && names[0] != null &&
names[0].startsWith(prefix)) {
// assume the first segment already was expanded
diff --git a/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.java
b/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.java
index 337ce85974b..9711081f950 100644
--- a/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.java
+++ b/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.java
@@ -60,7 +60,6 @@ public class ObjectUtil {
// if we aren't handling as a list, and we aren't handling as a map,
then just overwrite (i.e.
// nothing else to do)
- return;
}
// merges srcMap onto targetMap (i.e. changes targetMap but not srcMap)
diff --git a/solr/core/src/java/org/apache/solr/schema/PointType.java
b/solr/core/src/java/org/apache/solr/schema/PointType.java
index 6a6b29b698b..3d68af9449c 100644
--- a/solr/core/src/java/org/apache/solr/schema/PointType.java
+++ b/solr/core/src/java/org/apache/solr/schema/PointType.java
@@ -123,8 +123,8 @@ public class PointType extends CoordinateFieldType
implements SpatialQueryable {
return null;
}
- @Override
/** Care should be taken in calling this with higher order dimensions for
performance reasons. */
+ @Override
protected Query getSpecializedRangeQuery(
QParser parser,
SchemaField field,
diff --git
a/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
b/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
index d19b59470ee..d5dde182b84 100644
--- a/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
@@ -3387,9 +3387,7 @@ public class CollapsingQParserPlugin extends
QParserPlugin {
public void purgeGroupsThatHaveBoostedDocs(
final FixedBitSet collapsedSet,
final IntProcedure removeGroupKey,
- final Runnable resetNullGroupHead) {
- return;
- }
+ final Runnable resetNullGroupHead) {}
};
}
diff --git
a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java
b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java
index fbf5b18858e..7799db960c2 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java
@@ -104,7 +104,7 @@ public class FacetFieldMerger extends
FacetRequestSortedMerger<FacetField> {
List<SimpleOrderedMap<?>> resultBuckets = new ArrayList<>(Math.max(0,
(int) (last - first)));
- /**
+ /*
* this only works if there are no filters (like mincount) for (int
i=first; i<last; i++) {
* FacetBucket bucket = sortedBuckets.get(i); resultBuckets.add(
bucket.getMergedBucket() ); } *
*/
@@ -166,7 +166,7 @@ public class FacetFieldMerger extends
FacetRequestSortedMerger<FacetField> {
refinement =
getRefinementSpecial(mcontext, refinement, tagsWithPartial,
missingBucket, "missing");
}
- /**
+ /*
* allBuckets does not execute sub-facets because we don't change the
domain. We may need
* refinement info in the future though for stats. if (freq.allBuckets)
{ refinement =
* getRefinementSpecial(mcontext, refinement, tagsWithPartial,
allBuckets, "allBuckets"); }
diff --git
a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
index 366922e008a..cb7d5492a91 100644
---
a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
+++
b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
@@ -215,7 +215,7 @@ class FacetFieldProcessorByArrayDV extends
FacetFieldProcessorByArray {
int segMax = singleDv.getValueCount();
final SegCountPerSeg segCounter = getSegCountPerSeg(disi, segMax);
- /**
+ /*
* alternate trial implementations // ord // FieldUtil.visitOrds(singleDv,
disi,
* (doc,ord)->{counts[ord+1]++;} );
*
diff --git
a/solr/core/src/java/org/apache/solr/search/facet/FacetRequestSortedMerger.java
b/solr/core/src/java/org/apache/solr/search/facet/FacetRequestSortedMerger.java
index 63a28aa0829..e5176c6e2af 100644
---
a/solr/core/src/java/org/apache/solr/search/facet/FacetRequestSortedMerger.java
+++
b/solr/core/src/java/org/apache/solr/search/facet/FacetRequestSortedMerger.java
@@ -108,7 +108,7 @@ abstract class FacetRequestSortedMerger<FacetRequestT
extends FacetRequestSorted
} else {
final String key = sort.sortVariable;
- /**
+ /*
* final FacetSortableMerger[] arr = new
FacetSortableMerger[buckets.size()]; final int[]
* index = new int[arr.length]; int start = 0; int nullStart =
index.length; int i=0; for
* (FacetBucket bucket : buckets.values()) { FacetMerger merger =
diff --git
a/solr/core/src/java/org/apache/solr/security/SolrLogAuditLoggerPlugin.java
b/solr/core/src/java/org/apache/solr/security/SolrLogAuditLoggerPlugin.java
index ed609668d87..f5a4ec5a099 100644
--- a/solr/core/src/java/org/apache/solr/security/SolrLogAuditLoggerPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/SolrLogAuditLoggerPlugin.java
@@ -42,34 +42,32 @@ public class SolrLogAuditLoggerPlugin extends
AuditLoggerPlugin {
super.init(pluginConfig);
setFormatter(
event ->
- new StringBuilder()
- .append("type=\"")
- .append(event.getEventType().name())
- .append("\"")
- .append(" message=\"")
- .append(event.getMessage())
- .append("\"")
- .append(" method=\"")
- .append(event.getHttpMethod())
- .append("\"")
- .append(" status=\"")
- .append(event.getStatus())
- .append("\"")
- .append(" requestType=\"")
- .append(event.getRequestType())
- .append("\"")
- .append(" username=\"")
- .append(event.getUsername())
- .append("\"")
- .append(" resource=\"")
- .append(event.getResource())
- .append("\"")
- .append(" queryString=\"")
- .append(event.getHttpQueryString())
- .append("\"")
- .append(" collections=")
- .append(event.getCollections())
- .toString());
+ "type=\""
+ + event.getEventType().name()
+ + "\""
+ + " message=\""
+ + event.getMessage()
+ + "\""
+ + " method=\""
+ + event.getHttpMethod()
+ + "\""
+ + " status=\""
+ + event.getStatus()
+ + "\""
+ + " requestType=\""
+ + event.getRequestType()
+ + "\""
+ + " username=\""
+ + event.getUsername()
+ + "\""
+ + " resource=\""
+ + event.getResource()
+ + "\""
+ + " queryString=\""
+ + event.getHttpQueryString()
+ + "\""
+ + " collections="
+ + event.getCollections());
if (pluginConfig.size() > 0) {
throw new SolrException(
SolrException.ErrorCode.INVALID_STATE,
diff --git
a/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java
b/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java
index 078f57e8908..f661a7d156e 100644
--- a/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java
+++ b/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java
@@ -180,8 +180,6 @@ public final class HttpCacheHeaderUtil {
if (null != maxAge) {
resp.setDateHeader("Expires", timeNowForHeader() + (maxAge * 1000L));
}
-
- return;
}
/**
diff --git a/solr/core/src/java/org/apache/solr/update/PeerSync.java
b/solr/core/src/java/org/apache/solr/update/PeerSync.java
index 8f5700d7c86..7636bf54452 100644
--- a/solr/core/src/java/org/apache/solr/update/PeerSync.java
+++ b/solr/core/src/java/org/apache/solr/update/PeerSync.java
@@ -767,8 +767,8 @@ public class PeerSync implements SolrMetricProducer {
return handleVersionsWithRanges(otherVersions, completeList, ourUpdates,
ourLowThreshold);
}
- @VisibleForTesting
/** Implementation assumes the passed in lists are sorted and contain no
duplicates. */
+ @VisibleForTesting
static MissedUpdatesRequest handleVersionsWithRanges(
List<Long> otherVersions,
boolean completeList,
diff --git
a/solr/core/src/test/org/apache/solr/core/TestConfigSetImmutable.java
b/solr/core/src/test/org/apache/solr/core/TestConfigSetImmutable.java
index a3282439ac3..1ede297abdc 100644
--- a/solr/core/src/test/org/apache/solr/core/TestConfigSetImmutable.java
+++ b/solr/core/src/test/org/apache/solr/core/TestConfigSetImmutable.java
@@ -50,7 +50,7 @@ public class TestConfigSetImmutable extends RestTestBase {
// make the ConfigSet immutable
Files.writeString(
tmpConfDir.resolve("configsetprops.json"),
- new StringBuilder("{\"immutable\":\"true\"}"),
+ "{\"immutable\":\"true\"}",
StandardCharsets.UTF_8);
System.setProperty("managed.schema.mutable", "true");
diff --git
a/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java
b/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java
index 40cfb8a5019..0be315afc21 100644
---
a/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java
+++
b/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java
@@ -18,7 +18,6 @@ package org.apache.solr.search.facet;
import java.util.Arrays;
import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
import org.apache.solr.BaseDistributedSearchTestCase;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.common.params.SolrParams;
@@ -87,7 +86,7 @@ public class DistributedFacetSimpleRefinementLongTailTest
extends BaseDistribute
assertEquals("This indexing code assumes exactly 3 shards/clients", 3,
clients.size());
- final AtomicInteger docNum = new AtomicInteger();
+ int docNum = 0;
final SolrClient shard0 = clients.get(0);
final SolrClient shard1 = clients.get(1);
final SolrClient shard2 = clients.get(2);
@@ -95,9 +94,9 @@ public class DistributedFacetSimpleRefinementLongTailTest
extends BaseDistribute
// the 5 top foo_s terms have 100 docs each on every shard
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 5; j++) {
- shard0.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "aaa" + j,
statField, j * 13 - i));
- shard1.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "aaa" + j,
statField, j * 3 + i));
- shard2.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "aaa" + j,
statField, i * 7 + j));
+ shard0.add(sdoc("id", docNum++, "foo_s", "aaa" + j, statField, j * 13
- i));
+ shard1.add(sdoc("id", docNum++, "foo_s", "aaa" + j, statField, j * 3 +
i));
+ shard2.add(sdoc("id", docNum++, "foo_s", "aaa" + j, statField, i * 7 +
j));
}
}
@@ -105,14 +104,14 @@ public class DistributedFacetSimpleRefinementLongTailTest
extends BaseDistribute
// on both shard0 & shard1 ("bbb_")
for (int i = 0; i < 50; i++) {
for (int j = 0; j < 20; j++) {
- shard0.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "bbb" + j,
statField, 0));
- shard1.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "bbb" + j,
statField, 1));
+ shard0.add(sdoc("id", docNum++, "foo_s", "bbb" + j, statField, 0));
+ shard1.add(sdoc("id", docNum++, "foo_s", "bbb" + j, statField, 1));
}
// distracting term appears on only on shard2 50 times
- shard2.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "junkA"));
+ shard2.add(sdoc("id", docNum++, "foo_s", "junkA"));
}
// put "bbb0" on shard2 exactly once to sanity check refinement
- shard2.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "bbb0",
statField, -2));
+ shard2.add(sdoc("id", docNum++, "foo_s", "bbb0", statField, -2));
// long 'tail' foo_s term appears in 45 docs on every shard
// foo_s:tail is the only term with bar_s sub-pivot terms
@@ -122,23 +121,21 @@ public class DistributedFacetSimpleRefinementLongTailTest
extends BaseDistribute
// but the top 5 terms are ccc(0-4) -- 7 on each shard
// (4 docs each have junk terms)
String sub_term = (i < 35) ? "ccc" + (i % 5) : ((i < 41) ? "tailB" :
"junkA");
- shard0.add(
- sdoc("id", docNum.incrementAndGet(), "foo_s", "tail", "bar_s",
sub_term, statField, i));
- shard1.add(
- sdoc("id", docNum.incrementAndGet(), "foo_s", "tail", "bar_s",
sub_term, statField, i));
+ shard0.add(sdoc("id", docNum++, "foo_s", "tail", "bar_s", sub_term,
statField, i));
+ shard1.add(sdoc("id", docNum++, "foo_s", "tail", "bar_s", sub_term,
statField, i));
// shard2's top 5 sub-pivot terms are junk only it has with 8 docs each
// and 5 docs that use "tailB"
// NOTE: none of these get statField ! !
sub_term = (i < 40) ? "junkB" + (i % 5) : "tailB";
- shard2.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "tail",
"bar_s", sub_term));
+ shard2.add(sdoc("id", docNum++, "foo_s", "tail", "bar_s", sub_term));
}
// really long tail uncommon foo_s terms on shard2
for (int i = 0; i < 30; i++) {
// NOTE: using "Z" here so these sort before bbb0 when they tie for '1'
instance each on
// shard2
- shard2.add(sdoc("id", docNum.incrementAndGet(), "foo_s", "ZZZ" + i));
+ shard2.add(sdoc("id", docNum++, "foo_s", "ZZZ" + i));
}
}
diff --git
a/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java
b/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java
index 25f66221f73..bca3918786f 100644
---
a/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java
+++
b/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java
@@ -65,6 +65,7 @@ public class FieldMutatingUpdateProcessorTest extends
UpdateProcessorTestBase {
"//long[@name='min_foo_l'][.='-34']");
}
+ @SuppressWarnings("UnnecessaryStringBuilder")
public void testTrimAll() throws Exception {
SolrInputDocument d = null;
diff --git a/solr/licenses/error_prone_annotations-2.18.0.jar.sha1
b/solr/licenses/error_prone_annotations-2.18.0.jar.sha1
deleted file mode 100644
index df2166e6403..00000000000
--- a/solr/licenses/error_prone_annotations-2.18.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-89b684257096f548fa39a7df9fdaa409d4d4df91
diff --git a/solr/licenses/error_prone_annotations-2.22.0.jar.sha1
b/solr/licenses/error_prone_annotations-2.22.0.jar.sha1
new file mode 100644
index 00000000000..a0a78a421a9
--- /dev/null
+++ b/solr/licenses/error_prone_annotations-2.22.0.jar.sha1
@@ -0,0 +1 @@
+bfb9e4281a4cea34f0ec85b3acd47621cfab35b4
diff --git
a/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionCheckedDataReader.java
b/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionCheckedDataReader.java
index e6461fc6bb4..bfd956c4c1e 100644
---
a/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionCheckedDataReader.java
+++
b/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionCheckedDataReader.java
@@ -29,13 +29,13 @@ public abstract class ReductionCheckedDataReader<A> extends
ReductionDataReader<
super(inputStream, applier);
}
- @Override
/**
* Read a piece of data from the input stream and feed it to the applier.
<br>
* First checks that the piece of data exists before reading.
*
* @throws IOException if an exception occurs while reading from the input
stream
*/
+ @Override
public void read() throws IOException {
if (inputStream.readBoolean()) {
checkedRead();
diff --git
a/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionDataArrayReader.java
b/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionDataArrayReader.java
index b9ba9b95a66..781d57eac80 100644
---
a/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionDataArrayReader.java
+++
b/solr/modules/analytics/src/java/org/apache/solr/analytics/stream/reservation/read/ReductionDataArrayReader.java
@@ -33,13 +33,13 @@ public abstract class ReductionDataArrayReader<A> extends
ReductionDataReader<A>
this.signal = signal;
}
- @Override
/**
* Read an array of data from the input stream and feed it to the applier,
first signaling the
* size of the array.
*
* @throws IOException if an exception occurs while reading from the input
stream
*/
+ @Override
public void read() throws IOException {
int size = inputStream.readInt();
signal.accept(size);
diff --git
a/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
b/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
index 69e44360f2b..c10b42c0cfe 100644
---
a/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
+++
b/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
@@ -215,14 +215,17 @@ public class ExtractingDocumentLoader extends
ContentStreamLoader {
}
parser.parse(inputStream, parsingHandler, metadata, context);
} catch (TikaException e) {
- if (ignoreTikaException)
- log.warn(
- new StringBuilder("skip extracting text due to ")
- .append(e.getLocalizedMessage())
- .append(". metadata=")
- .append(metadata.toString())
- .toString()); // nowarn
- else throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
e);
+ if (ignoreTikaException) {
+ if (log.isWarnEnabled()) {
+ log.warn(
+ "skip extracting text due to {}. metadata={}",
+ e.getLocalizedMessage(),
+ metadata,
+ e);
+ }
+ } else {
+ throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
+ }
}
if (extractOnly == false) {
addDoc(handler);
diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java
b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java
index f8d800dfaf7..f9a8717c1c7 100644
--- a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java
+++ b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java
@@ -1899,8 +1899,6 @@ public class FileUtil {
return write(fileContext, path, charseq, StandardCharsets.UTF_8);
}
- @InterfaceAudience.LimitedPrivate({"ViewDistributedFileSystem"})
- @InterfaceStability.Unstable
/**
* Used in ViewDistributedFileSystem rename API to get access to the
protected
* API of FileSystem interface. Even though Rename with options API
@@ -1909,6 +1907,8 @@ public class FileUtil {
* out casting to the specific filesystem. This util method is proposed to
get
* the access to FileSystem#rename with options.
*/
+ @InterfaceAudience.LimitedPrivate({"ViewDistributedFileSystem"})
+ @InterfaceStability.Unstable
@SuppressWarnings("deprecation")
public static void rename(FileSystem srcFs, Path src, Path dst,
final Options.Rename... options) throws IOException {
diff --git
a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java
b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java
index b14b012280c..6cd2cf35d63 100644
---
a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java
+++
b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java
@@ -43,8 +43,8 @@ public class BlockCacheTest extends SolrTestCase {
byte[] buffer = new byte[1024];
Random random = random();
byte[] newData = new byte[blockSize];
- AtomicLong hitsInCache = new AtomicLong();
- AtomicLong missesInCache = new AtomicLong();
+ long hitsInCache = 0L;
+ long missesInCache = 0L;
long storeTime = 0;
long fetchTime = 0;
int passes = 10000;
@@ -59,9 +59,9 @@ public class BlockCacheTest extends SolrTestCase {
blockCacheKey.setPath("/");
if (blockCache.fetch(blockCacheKey, buffer)) {
- hitsInCache.incrementAndGet();
+ hitsInCache += 1;
} else {
- missesInCache.incrementAndGet();
+ missesInCache += 1;
}
byte[] testData = testData(random, blockSize, newData);
@@ -77,8 +77,8 @@ public class BlockCacheTest extends SolrTestCase {
assertArrayEquals("buffer content differs", testData, buffer);
}
}
- System.out.println("Cache Hits = " + hitsInCache.get());
- System.out.println("Cache Misses = " + missesInCache.get());
+ System.out.println("Cache Hits = " + hitsInCache);
+ System.out.println("Cache Misses = " + missesInCache);
System.out.println("Store = " + (storeTime / (double) passes) /
1000000.0);
System.out.println("Fetch = " + (fetchTime / (double) passes) /
1000000.0);
System.out.println("# of Elements = " + blockCache.getSize());
diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
index 64070349bfa..19ac717bdda 100644
--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
@@ -218,7 +218,7 @@ public class LTRRescorer extends Rescorer {
LTRScoringQuery.ModelWeight.ModelScorer scorer,
ScoreDoc[] reranked)
throws IOException {
- /**
+ /*
* Scorer for a LTRScoringQuery.ModelWeight should never be null since we
always have to call
* score even if no feature scorers match, since a model might use that
info to return a
* non-zero score. Same applies for the case of advancing a
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
index c41af634df7..3c0b2b9e33d 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
@@ -1118,8 +1118,10 @@ public class Http2SolrClient extends SolrClient {
HttpClientBuilderFactory factory;
try {
factory =
- (HttpClientBuilderFactory)
-
Class.forName(factoryClassName).getConstructor().newInstance();
+ Class.forName(factoryClassName)
+ .asSubclass(HttpClientBuilderFactory.class)
+ .getDeclaredConstructor()
+ .newInstance();
} catch (InstantiationException
| IllegalAccessException
| ClassNotFoundException
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
index 90fc938901a..b0d86fa2c6d 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
@@ -162,10 +162,10 @@ public class HttpClientUtil {
log.debug("Using {}", socketFactoryRegistryProviderClassName);
try {
socketFactoryRegistryProvider =
- (SocketFactoryRegistryProvider)
- Class.forName(socketFactoryRegistryProviderClassName)
- .getConstructor()
- .newInstance();
+ Class.forName(socketFactoryRegistryProviderClassName)
+ .asSubclass(SocketFactoryRegistryProvider.class)
+ .getDeclaredConstructor()
+ .newInstance();
} catch (InstantiationException
| IllegalAccessException
| ClassNotFoundException
@@ -181,8 +181,10 @@ public class HttpClientUtil {
log.debug("Using {}", factoryClassName);
try {
HttpClientBuilderFactory factory =
- (HttpClientBuilderFactory)
- Class.forName(factoryClassName).getConstructor().newInstance();
+ Class.forName(factoryClassName)
+ .asSubclass(HttpClientBuilderFactory.class)
+ .getDeclaredConstructor()
+ .newInstance();
httpClientBuilder =
factory.getHttpClientBuilder(SolrHttpClientBuilder.create());
} catch (InstantiationException
| IllegalAccessException
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
index d3db7429f44..3de37dbb712 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
@@ -87,7 +87,7 @@ public abstract class LBSolrClient extends SolrClient {
static {
solrQuery.setRows(0);
- /**
+ /*
* Default sort (if we don't supply a sort) is by score and since we
request 0 rows any sorting
* and scoring is not necessary. SolrQuery.DOCID schema-independently
specifies a non-scoring
* sort. <code>_docid_ asc</code> sort is efficient, <code>_docid_
desc</code> sort is not, so
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
index 3ad6d3af0a9..b33f6771c16 100644
---
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
+++
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
@@ -284,7 +284,7 @@ public class XMLResponseParser extends ResponseParser {
}
}
- /**
+ /*
* The name in a NamedList can actually be null if( name == null ) {
throw new
* XMLStreamException( "requires 'name' attribute:
"+parser.getLocalName(),
* parser.getLocation() ); }
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
index 7ca05b279e3..6648dd17e5c 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
@@ -180,7 +180,7 @@ public class Slice extends ZkNodeProps implements
Iterable<Replica> {
}
range = tmpRange;
- /**
+ /*
* debugging. this isn't an error condition for custom sharding. if (range
== null) {
* System.out.println("###### NO RANGE for " + name + " props=" + props); }
*/
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
index 341edfb864f..f70c0bd583a 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
@@ -95,7 +95,7 @@ public class JavaBinCodec implements PushWriter {
SOLRDOCLST = 12,
BYTEARR = 13,
ITERATOR = 14,
- /** this is a special tag signals an end. No value is associated with it
*/
+ /* this is a special tag signals an end. No value is associated with it
*/
END = 15,
SOLRINPUTDOC = 16,
MAP_ENTRY_ITER = 17,
diff --git
a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientTest.java
b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientTest.java
index 21800c6d5a9..dd9bf0ea927 100644
---
a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientTest.java
+++
b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientTest.java
@@ -996,5 +996,5 @@ public class Http2SolrClientTest extends SolrJettyTestBase {
}
}
- /** Missed tests : - set cookies via interceptor - invariant params -
compression */
+ /* Missed tests : - set cookies via interceptor - invariant params -
compression */
}
diff --git
a/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java
b/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java
index 45d8b78174a..198d00b6de7 100644
---
a/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java
+++
b/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java
@@ -1208,7 +1208,6 @@ public class MiniSolrCloudCluster {
return this;
}
- @SuppressWarnings("InvalidParam")
/**
* Force the cluster Collection and config state API execution as well as
the cluster state
* update strategy to be either Overseer based or distributed. <b>This
method can be useful when
@@ -1243,6 +1242,7 @@ public class MiniSolrCloudCluster {
* <p>If {@code distributedCollectionConfigSetApi} is {@code true}
then this parameter must
* be {@code true}.
*/
+ @SuppressWarnings("InvalidParam")
public Builder withDistributedClusterStateUpdates(
boolean distributedCollectionConfigSetApi, boolean
distributedClusterStateUpdates) {
useDistributedCollectionConfigSetExecution =
distributedCollectionConfigSetApi;
diff --git a/versions.lock b/versions.lock
index dc429e5b287..1d49e17a977 100644
--- a/versions.lock
+++ b/versions.lock
@@ -42,7 +42,7 @@ com.google.cloud:google-cloud-core-grpc:2.18.1 (1
constraints: 20100ea6)
com.google.cloud:google-cloud-core-http:2.18.1 (1 constraints: 20100ea6)
com.google.cloud:google-cloud-storage:2.22.3 (2 constraints: d31c1c27)
com.google.code.gson:gson:2.10.1 (7 constraints: 88613f16)
-com.google.errorprone:error_prone_annotations:2.18.0 (11 constraints: bb893df4)
+com.google.errorprone:error_prone_annotations:2.22.0 (11 constraints: bb893df4)
com.google.guava:failureaccess:1.0.1 (2 constraints: f9199e37)
com.google.guava:guava:32.1.2-jre (25 constraints: 366e017a)
com.google.guava:guava-parent:32.1.2-jre (1 constraints: b80ba5eb)
diff --git a/versions.props b/versions.props
index 69c6a4dfbb9..46c49ee24f2 100644
--- a/versions.props
+++ b/versions.props
@@ -10,7 +10,7 @@ com.github.ben-manes.caffeine:caffeine=3.1.6
com.github.spotbugs:*=4.7.3
com.github.stephenc.jcip:jcip-annotations=1.0-1
com.google.cloud:google-cloud-bom=0.197.0
-com.google.errorprone:*=2.18.0
+com.google.errorprone:*=2.22.0
com.google.guava:guava=32.1.2-jre
com.google.re2j:re2j=1.7
com.jayway.jsonpath:json-path=2.8.0