We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run the latest codeanalyzer on https://github.com/eclipse-store/bookstore-demo and the error is,
java.lang.IllegalStateException: Duplicate key requireNonEmpty(T, Supplier) (attempted merging values Callable(signature=requireNonEmpty(T, Supplier), comment=/** * Checks that the specified char sequence is not {@code null} or empty and throws a customized * {@link NullPointerException} respectively {@link IllegalArgumentException} if it is. * * @param <T> * @param charSequence the char sequence to check * @param messageSupplier supplier of the detail message to be * used in the event that a exception is thrown * @return {@code charSequence} if not {@code null} or empty * @throws NullPointerException if {@code charSequence} is {@code null} * @throws IllegalArgumentException if {@code charSequence} is empty */, annotations=[], modifiers=[public, static], thrownExceptions=[], declaration=public static T requireNonEmpty(final T charSequence, final Supplier<String> messageSupplier), parameters=[ParameterInCallable(type=T, name=charSequence, annotations=[], modifiers=[final]), ParameterInCallable(type=java.util.function.Supplier<java.lang.String>, name=messageSupplier, annotations=[], modifiers=[final])], code={ if (charSequence == null) { throw new NullPointerException(messageSupplier.get()); } if (charSequence.length() == 0) { throw new IllegalArgumentException(messageSupplier.get()); } return charSequence; }, startLine=38, endLine=52, returnType=T, isImplicit=false, isConstructor=false, referencedTypes=[], accessedFields=[], callSites=[CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=45, startColumn=35, endLine=45, endColumn=55), CallSite(methodName=length, receiverExpr=charSequence, receiverType=, argumentTypes=[], returnType=, calleeSignature=length(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=47, startColumn=6, endLine=47, endColumn=26), CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=49, startColumn=39, endLine=49, endColumn=59), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.NullPointerException, argumentTypes=[java.lang.String], returnType=java.lang.NullPointerException, calleeSignature=NullPointerException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=45, startColumn=10, endLine=45, endColumn=56), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.IllegalArgumentException, argumentTypes=[java.lang.String], returnType=java.lang.IllegalArgumentException, calleeSignature=IllegalArgumentException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=49, startColumn=10, endLine=49, endColumn=60)], variableDeclarations=[], cyclomaticComplexity=0) and Callable(signature=requireNonEmpty(T, Supplier), comment=/** * Checks that the specified collection is not {@code null} or empty and throws a customized * {@link NullPointerException} respectively {@link IllegalArgumentException} if it is. * * @param <T> * @param collection the collection to check * @param messageSupplier supplier of the detail message to be * used in the event that a exception is thrown * @return {@code collection} if not {@code null} or empty * @throws NullPointerException if {@code collection} is {@code null} * @throws IllegalArgumentException if {@code collection} is empty */, annotations=[], modifiers=[public, static], thrownExceptions=[], declaration=public static T requireNonEmpty(final T collection, final Supplier<String> messageSupplier), parameters=[ParameterInCallable(type=T, name=collection, annotations=[], modifiers=[final]), ParameterInCallable(type=java.util.function.Supplier<java.lang.String>, name=messageSupplier, annotations=[], modifiers=[final])], code={ if (collection == null) { throw new NullPointerException(messageSupplier.get()); } if (collection.isEmpty()) { throw new IllegalArgumentException(messageSupplier.get()); } return collection; }, startLine=94, endLine=108, returnType=T, isImplicit=false, isConstructor=false, referencedTypes=[], accessedFields=[], callSites=[CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=101, startColumn=35, endLine=101, endColumn=55), CallSite(methodName=isEmpty, receiverExpr=collection, receiverType=, argumentTypes=[], returnType=, calleeSignature=isEmpty(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=103, startColumn=6, endLine=103, endColumn=25), CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=105, startColumn=39, endLine=105, endColumn=59), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.NullPointerException, argumentTypes=[java.lang.String], returnType=java.lang.NullPointerException, calleeSignature=NullPointerException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=101, startColumn=10, endLine=101, endColumn=56), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.IllegalArgumentException, argumentTypes=[java.lang.String], returnType=java.lang.IllegalArgumentException, calleeSignature=IllegalArgumentException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=105, startColumn=10, endLine=105, endColumn=60)], variableDeclarations=[], cyclomaticComplexity=0))
The text was updated successfully, but these errors were encountered:
duplicate #41
Sorry, something went wrong.
rahlk
No branches or pull requests
Run the latest codeanalyzer on https://github.com/eclipse-store/bookstore-demo and the error is,
java.lang.IllegalStateException: Duplicate key requireNonEmpty(T, Supplier) (attempted merging values Callable(signature=requireNonEmpty(T, Supplier), comment=/** * Checks that the specified char sequence is not {@code null} or empty and throws a customized * {@link NullPointerException} respectively {@link IllegalArgumentException} if it is. * * @param <T> * @param charSequence the char sequence to check * @param messageSupplier supplier of the detail message to be * used in the event that a exception is thrown * @return {@code charSequence} if not {@code null} or empty * @throws NullPointerException if {@code charSequence} is {@code null} * @throws IllegalArgumentException if {@code charSequence} is empty */, annotations=[], modifiers=[public, static], thrownExceptions=[], declaration=public static T requireNonEmpty(final T charSequence, final Supplier<String> messageSupplier), parameters=[ParameterInCallable(type=T, name=charSequence, annotations=[], modifiers=[final]), ParameterInCallable(type=java.util.function.Supplier<java.lang.String>, name=messageSupplier, annotations=[], modifiers=[final])], code={ if (charSequence == null) { throw new NullPointerException(messageSupplier.get()); } if (charSequence.length() == 0) { throw new IllegalArgumentException(messageSupplier.get()); } return charSequence; }, startLine=38, endLine=52, returnType=T, isImplicit=false, isConstructor=false, referencedTypes=[], accessedFields=[], callSites=[CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=45, startColumn=35, endLine=45, endColumn=55), CallSite(methodName=length, receiverExpr=charSequence, receiverType=, argumentTypes=[], returnType=, calleeSignature=length(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=47, startColumn=6, endLine=47, endColumn=26), CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=49, startColumn=39, endLine=49, endColumn=59), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.NullPointerException, argumentTypes=[java.lang.String], returnType=java.lang.NullPointerException, calleeSignature=NullPointerException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=45, startColumn=10, endLine=45, endColumn=56), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.IllegalArgumentException, argumentTypes=[java.lang.String], returnType=java.lang.IllegalArgumentException, calleeSignature=IllegalArgumentException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=49, startColumn=10, endLine=49, endColumn=60)], variableDeclarations=[], cyclomaticComplexity=0) and Callable(signature=requireNonEmpty(T, Supplier), comment=/** * Checks that the specified collection is not {@code null} or empty and throws a customized * {@link NullPointerException} respectively {@link IllegalArgumentException} if it is. * * @param <T> * @param collection the collection to check * @param messageSupplier supplier of the detail message to be * used in the event that a exception is thrown * @return {@code collection} if not {@code null} or empty * @throws NullPointerException if {@code collection} is {@code null} * @throws IllegalArgumentException if {@code collection} is empty */, annotations=[], modifiers=[public, static], thrownExceptions=[], declaration=public static T requireNonEmpty(final T collection, final Supplier<String> messageSupplier), parameters=[ParameterInCallable(type=T, name=collection, annotations=[], modifiers=[final]), ParameterInCallable(type=java.util.function.Supplier<java.lang.String>, name=messageSupplier, annotations=[], modifiers=[final])], code={ if (collection == null) { throw new NullPointerException(messageSupplier.get()); } if (collection.isEmpty()) { throw new IllegalArgumentException(messageSupplier.get()); } return collection; }, startLine=94, endLine=108, returnType=T, isImplicit=false, isConstructor=false, referencedTypes=[], accessedFields=[], callSites=[CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=101, startColumn=35, endLine=101, endColumn=55), CallSite(methodName=isEmpty, receiverExpr=collection, receiverType=, argumentTypes=[], returnType=, calleeSignature=isEmpty(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=103, startColumn=6, endLine=103, endColumn=25), CallSite(methodName=get, receiverExpr=messageSupplier, receiverType=java.util.function.Supplier<java.lang.String>, argumentTypes=[], returnType=java.lang.String, calleeSignature=get(), isPublic=true, isProtected=false, isPrivate=false, isUnspecified=false, isStaticCall=false, isConstructorCall=false, startLine=105, startColumn=39, endLine=105, endColumn=59), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.NullPointerException, argumentTypes=[java.lang.String], returnType=java.lang.NullPointerException, calleeSignature=NullPointerException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=101, startColumn=10, endLine=101, endColumn=56), CallSite(methodName=<init>, receiverExpr=, receiverType=java.lang.IllegalArgumentException, argumentTypes=[java.lang.String], returnType=java.lang.IllegalArgumentException, calleeSignature=IllegalArgumentException(java.lang.String), isPublic=false, isProtected=false, isPrivate=false, isUnspecified=true, isStaticCall=false, isConstructorCall=true, startLine=105, startColumn=10, endLine=105, endColumn=60)], variableDeclarations=[], cyclomaticComplexity=0))
The text was updated successfully, but these errors were encountered: