Should we maybe merge this also to Solr? I know it's not needed, but "if" statements around dependencies look strange to me!
I can try to merge it as a proof of concept. 😜 Uwe Am March 11, 2021 9:27:41 PM UTC schrieb [email protected]: >This is an automated email from the ASF dual-hosted git repository. > >dweiss pushed a commit to branch main >in repository https://gitbox.apache.org/repos/asf/lucene.git > > >The following commit(s) were added to refs/heads/main by this push: >new 8bbcc39 Always include errorprone dependency, even if we're not >checking. This ensures consistent use patterns across JVMs. >8bbcc39 is described below > >commit 8bbcc395832ccd109794f4b85a71a59a0af2d4f4 >Author: Dawid Weiss <[email protected]> >AuthorDate: Thu Mar 11 22:27:25 2021 +0100 > >Always include errorprone dependency, even if we're not checking. This >ensures consistent use patterns across JVMs. >--- >gradle/validation/error-prone.gradle | 248 >++++++++++++++++++----------------- > 1 file changed, 125 insertions(+), 123 deletions(-) > >diff --git a/gradle/validation/error-prone.gradle >b/gradle/validation/error-prone.gradle >index 2cec644..edcbaed 100644 >--- a/gradle/validation/error-prone.gradle >+++ b/gradle/validation/error-prone.gradle >@@ -15,10 +15,9 @@ > * limitations under the License. > */ > >-// LUCENE-9650: Errorprone on master/gradle no longer works with >JDK-16 >-if (rootProject.runtimeJavaVersion > JavaVersion.VERSION_15) { >+def includeErrorProne = rootProject.runtimeJavaVersion <= >JavaVersion.VERSION_15; >+if (!includeErrorProne) { >logger.warn("WARNING: errorprone disabled (won't work with JDK >${rootProject.runtimeJavaVersion})") >- return > } > > allprojects { prj -> >@@ -29,127 +28,130 @@ allprojects { prj -> > errorprone("com.google.errorprone:error_prone_core") > } > >- tasks.withType(JavaCompile) { task -> >- options.errorprone.disableWarningsInGeneratedCode = true >- options.errorprone.errorproneArgs = [ >- // test >- '-Xep:ExtendingJUnitAssert:OFF', >- '-Xep:UseCorrectAssertInTests:OFF', >- '-Xep:DefaultPackage:OFF', >- '-Xep:FloatingPointLiteralPrecision:OFF', >- '-Xep:CatchFail:OFF', >- '-Xep:TryFailThrowable:OFF', >- '-Xep:MathAbsoluteRandom:OFF', >- '-Xep:AssertionFailureIgnored:OFF', >- '-Xep:JUnit4TestNotRun:OFF', >- '-Xep:FallThrough:OFF', >- '-Xep:CatchAndPrintStackTrace:OFF', >- '-Xep:ToStringReturnsNull:OFF', >- '-Xep:ArrayAsKeyOfSetOrMap:OFF', >- '-Xep:StaticAssignmentInConstructor:OFF', >- '-Xep:SelfAssignment:OFF', >- '-Xep:InvalidPatternSyntax:OFF', >- '-Xep:MissingFail:OFF', >- '-Xep:LossyPrimitiveCompare:OFF', >- '-Xep:ComparableType:OFF', >- '-Xep:InfiniteRecursion:OFF', >- '-Xep:MisusedDayOfYear:OFF', >- '-Xep:FloatingPointAssertionWithinEpsilon:OFF', >+ // LUCENE-9650: Errorprone on master/gradle no longer works with >JDK-16 >+ if (includeErrorProne) { >+ tasks.withType(JavaCompile) { task -> >+ options.errorprone.disableWarningsInGeneratedCode = true >+ options.errorprone.errorproneArgs = [ >+ // test >+ '-Xep:ExtendingJUnitAssert:OFF', >+ '-Xep:UseCorrectAssertInTests:OFF', >+ '-Xep:DefaultPackage:OFF', >+ '-Xep:FloatingPointLiteralPrecision:OFF', >+ '-Xep:CatchFail:OFF', >+ '-Xep:TryFailThrowable:OFF', >+ '-Xep:MathAbsoluteRandom:OFF', >+ '-Xep:AssertionFailureIgnored:OFF', >+ '-Xep:JUnit4TestNotRun:OFF', >+ '-Xep:FallThrough:OFF', >+ '-Xep:CatchAndPrintStackTrace:OFF', >+ '-Xep:ToStringReturnsNull:OFF', >+ '-Xep:ArrayAsKeyOfSetOrMap:OFF', >+ '-Xep:StaticAssignmentInConstructor:OFF', >+ '-Xep:SelfAssignment:OFF', >+ '-Xep:InvalidPatternSyntax:OFF', >+ '-Xep:MissingFail:OFF', >+ '-Xep:LossyPrimitiveCompare:OFF', >+ '-Xep:ComparableType:OFF', >+ '-Xep:InfiniteRecursion:OFF', >+ '-Xep:MisusedDayOfYear:OFF', >+ '-Xep:FloatingPointAssertionWithinEpsilon:OFF', > >- '-Xep:ThrowNull:OFF', >- '-Xep:StaticGuardedByInstance:OFF', >- '-Xep:ArrayHashCode:OFF', >- '-Xep:ArrayEquals:OFF', >- '-Xep:IdentityBinaryExpression:OFF', >- '-Xep:ComplexBooleanConstant:OFF', >- '-Xep:ComplexBooleanConstant:OFF', >- '-Xep:StreamResourceLeak:OFF', >- '-Xep:UnnecessaryLambda:OFF', >- '-Xep:ObjectToString:OFF', >- '-Xep:URLEqualsHashCode:OFF', >- '-Xep:DoubleBraceInitialization:OFF', >- '-Xep:ShortCircuitBoolean:OFF', >- '-Xep:InputStreamSlowMultibyteRead:OFF', >- '-Xep:NonCanonicalType:OFF', >- '-Xep:CollectionIncompatibleType:OFF', >- '-Xep:TypeParameterShadowing:OFF', >- '-Xep:ThreadJoinLoop:OFF', >- '-Xep:MutableConstantField:OFF', >- '-Xep:ReturnValueIgnored:OFF', >- '-Xep:CollectionIncompatibleType:OFF', >- '-Xep:SameNameButDifferent:OFF', >- '-Xep:InvalidParam:OFF', >- '-Xep:CompareToZero:OFF', >- '-Xep:DoubleCheckedLocking:OFF', >- '-Xep:BadShiftAmount:OFF', >- '-Xep:CollectionUndefinedEquality:OFF', >- '-Xep:UnescapedEntity:OFF', >- '-Xep:BoxedPrimitiveEquality:OFF', >- '-Xep:LogicalAssignment:OFF', >- '-Xep:DoubleCheckedLocking:OFF', >- '-Xep:AmbiguousMethodReference:OFF', >- '-Xep:FormatString:OFF', >- '-Xep:InstanceOfAndCastMatchWrongType:OFF', >- '-Xep:ModifyCollectionInEnhancedForLoop:OFF', >- '-Xep:JavaLangClash:OFF', >- '-Xep:TypeParameterUnusedInFormals:OFF', >- '-Xep:UnusedNestedClass:OFF', >- '-Xep:OverrideThrowableToString:OFF', >- '-Xep:FutureReturnValueIgnored:OFF', >- '-Xep:BadInstanceof:OFF', >- '-Xep:UnusedNestedClass:OFF', >- '-Xep:OverrideThrowableToString:OFF', >- '-Xep:EqualsIncompatibleType:OFF', >- '-Xep:ByteBufferBackingArray:OFF', >- '-Xep:ByteBufferBackingArray:OFF', >- '-Xep:UnusedMethod:OFF', >- '-Xep:ObjectsHashCodePrimitive:OFF', >- '-Xep:ObjectsHashCodePrimitive:OFF', >- '-Xep:UnnecessaryAnonymousClass:OFF', >- '-Xep:BoxedPrimitiveConstructor:OFF', >- '-Xep:ArgumentSelectionDefectChecker:OFF', >- '-Xep:StringSplitter:OFF', >- '-Xep:MixedMutabilityReturnType:OFF', >- '-Xep:EqualsUnsafeCast:OFF', >- '-Xep:OperatorPrecedence:OFF', >- '-Xep:HidingField:OFF', >- '-Xep:ThreadPriorityCheck:OFF', >- '-Xep:InlineFormatString:OFF', >- '-Xep:EqualsUnsafeCast:OFF', >- '-Xep:UnsynchronizedOverridesSynchronized:OFF', >- '-Xep:OperatorPrecedence:OFF', >- '-Xep:ArrayToString:OFF', >- '-Xep:ClassCanBeStatic:OFF', >- '-Xep:InvalidInlineTag:OFF', >- '-Xep:EmptyCatch:OFF', >- '-Xep:UnnecessaryParentheses:OFF', >- '-Xep:AlmostJavadoc:OFF', >- '-Xep:Finally:OFF', >- '-Xep:ImmutableEnumChecker:OFF', >- '-Xep:NonAtomicVolatileUpdate:OFF', >- '-Xep:MutablePublicArray:OFF', >- '-Xep:LockNotBeforeTry:OFF', >- '-Xep:WaitNotInLoop:OFF', >- '-Xep:UndefinedEquals:OFF', >- '-Xep:JdkObsolete:OFF', >- '-Xep:NarrowingCompoundAssignment:OFF', >- '-Xep:InconsistentCapitalization:OFF', >- '-Xep:IntLongMath:OFF', >- '-Xep:SynchronizeOnNonFinalField:OFF', >- '-Xep:ThreadLocalUsage:OFF', >- '-Xep:ProtectedMembersInFinalClass:OFF', >- '-Xep:BadImport:OFF', >- '-Xep:InconsistentHashCode:OFF', >- '-Xep:MissingOverride:OFF', >- '-Xep:EqualsGetClass:OFF', >- '-Xep:PublicConstructorForAbstractClass:OFF', >- '-Xep:EscapedEntity:OFF', >- '-Xep:ModifiedButNotUsed:OFF', >- '-Xep:ReferenceEquality:OFF', >- '-Xep:InvalidBlockTag:OFF', >- '-Xep:MissingSummary:OFF', >- '-Xep:UnusedVariable:OFF' >- ] >+ '-Xep:ThrowNull:OFF', >+ '-Xep:StaticGuardedByInstance:OFF', >+ '-Xep:ArrayHashCode:OFF', >+ '-Xep:ArrayEquals:OFF', >+ '-Xep:IdentityBinaryExpression:OFF', >+ '-Xep:ComplexBooleanConstant:OFF', >+ '-Xep:ComplexBooleanConstant:OFF', >+ '-Xep:StreamResourceLeak:OFF', >+ '-Xep:UnnecessaryLambda:OFF', >+ '-Xep:ObjectToString:OFF', >+ '-Xep:URLEqualsHashCode:OFF', >+ '-Xep:DoubleBraceInitialization:OFF', >+ '-Xep:ShortCircuitBoolean:OFF', >+ '-Xep:InputStreamSlowMultibyteRead:OFF', >+ '-Xep:NonCanonicalType:OFF', >+ '-Xep:CollectionIncompatibleType:OFF', >+ '-Xep:TypeParameterShadowing:OFF', >+ '-Xep:ThreadJoinLoop:OFF', >+ '-Xep:MutableConstantField:OFF', >+ '-Xep:ReturnValueIgnored:OFF', >+ '-Xep:CollectionIncompatibleType:OFF', >+ '-Xep:SameNameButDifferent:OFF', >+ '-Xep:InvalidParam:OFF', >+ '-Xep:CompareToZero:OFF', >+ '-Xep:DoubleCheckedLocking:OFF', >+ '-Xep:BadShiftAmount:OFF', >+ '-Xep:CollectionUndefinedEquality:OFF', >+ '-Xep:UnescapedEntity:OFF', >+ '-Xep:BoxedPrimitiveEquality:OFF', >+ '-Xep:LogicalAssignment:OFF', >+ '-Xep:DoubleCheckedLocking:OFF', >+ '-Xep:AmbiguousMethodReference:OFF', >+ '-Xep:FormatString:OFF', >+ '-Xep:InstanceOfAndCastMatchWrongType:OFF', >+ '-Xep:ModifyCollectionInEnhancedForLoop:OFF', >+ '-Xep:JavaLangClash:OFF', >+ '-Xep:TypeParameterUnusedInFormals:OFF', >+ '-Xep:UnusedNestedClass:OFF', >+ '-Xep:OverrideThrowableToString:OFF', >+ '-Xep:FutureReturnValueIgnored:OFF', >+ '-Xep:BadInstanceof:OFF', >+ '-Xep:UnusedNestedClass:OFF', >+ '-Xep:OverrideThrowableToString:OFF', >+ '-Xep:EqualsIncompatibleType:OFF', >+ '-Xep:ByteBufferBackingArray:OFF', >+ '-Xep:ByteBufferBackingArray:OFF', >+ '-Xep:UnusedMethod:OFF', >+ '-Xep:ObjectsHashCodePrimitive:OFF', >+ '-Xep:ObjectsHashCodePrimitive:OFF', >+ '-Xep:UnnecessaryAnonymousClass:OFF', >+ '-Xep:BoxedPrimitiveConstructor:OFF', >+ '-Xep:ArgumentSelectionDefectChecker:OFF', >+ '-Xep:StringSplitter:OFF', >+ '-Xep:MixedMutabilityReturnType:OFF', >+ '-Xep:EqualsUnsafeCast:OFF', >+ '-Xep:OperatorPrecedence:OFF', >+ '-Xep:HidingField:OFF', >+ '-Xep:ThreadPriorityCheck:OFF', >+ '-Xep:InlineFormatString:OFF', >+ '-Xep:EqualsUnsafeCast:OFF', >+ '-Xep:UnsynchronizedOverridesSynchronized:OFF', >+ '-Xep:OperatorPrecedence:OFF', >+ '-Xep:ArrayToString:OFF', >+ '-Xep:ClassCanBeStatic:OFF', >+ '-Xep:InvalidInlineTag:OFF', >+ '-Xep:EmptyCatch:OFF', >+ '-Xep:UnnecessaryParentheses:OFF', >+ '-Xep:AlmostJavadoc:OFF', >+ '-Xep:Finally:OFF', >+ '-Xep:ImmutableEnumChecker:OFF', >+ '-Xep:NonAtomicVolatileUpdate:OFF', >+ '-Xep:MutablePublicArray:OFF', >+ '-Xep:LockNotBeforeTry:OFF', >+ '-Xep:WaitNotInLoop:OFF', >+ '-Xep:UndefinedEquals:OFF', >+ '-Xep:JdkObsolete:OFF', >+ '-Xep:NarrowingCompoundAssignment:OFF', >+ '-Xep:InconsistentCapitalization:OFF', >+ '-Xep:IntLongMath:OFF', >+ '-Xep:SynchronizeOnNonFinalField:OFF', >+ '-Xep:ThreadLocalUsage:OFF', >+ '-Xep:ProtectedMembersInFinalClass:OFF', >+ '-Xep:BadImport:OFF', >+ '-Xep:InconsistentHashCode:OFF', >+ '-Xep:MissingOverride:OFF', >+ '-Xep:EqualsGetClass:OFF', >+ '-Xep:PublicConstructorForAbstractClass:OFF', >+ '-Xep:EscapedEntity:OFF', >+ '-Xep:ModifiedButNotUsed:OFF', >+ '-Xep:ReferenceEquality:OFF', >+ '-Xep:InvalidBlockTag:OFF', >+ '-Xep:MissingSummary:OFF', >+ '-Xep:UnusedVariable:OFF' >+ ] >+ } > } > } > } -- Uwe Schindler Achterdiek 19, 28357 Bremen https://www.thetaphi.de
