Skip to content

ErrorProne reports #26

Closed
Closed
@Capstan

Description

@Capstan
/home/travis/build/java-json-tools/jackson-coreutils/src/main/java/com/github/fge/jackson/jsonpointer/TreePointer.java:171: warning: [EqualsGetClass] Overriding Object#equals in a non-final class by using getClass rather than instanceof breaks substitutability of subclasses.
    public final boolean equals(final Object obj)
                         ^
    (see https://errorprone.info/bugpattern/EqualsGetClass)
  Did you mean to remove this line?
/home/travis/build/java-json-tools/jackson-coreutils/src/main/java/com/github/fge/jackson/jsonpointer/TokenResolver.java:87: warning: [EqualsGetClass] Overriding Object#equals in a non-final class by using getClass rather than instanceof breaks substitutability of subclasses.
    public final boolean equals(final Object obj)
                         ^
    (see https://errorprone.info/bugpattern/EqualsGetClass)
  Did you mean to remove this line?
/home/travis/build/java-json-tools/jackson-coreutils/src/main/java/com/github/fge/jackson/jsonpointer/ReferenceToken.java:58: warning: [MutableConstantField] Constant field declarations should use the immutable type (such as ImmutableList) instead of the general collection interface type (such as List)
    private static final List<Character> ENCODED = ImmutableList.of('0', '1');
                             ^
    (see https://errorprone.info/bugpattern/MutableConstantField)
  Did you mean 'private static final ImmutableList<Character> ENCODED = ImmutableList.of('0', '1');'?
/home/travis/build/java-json-tools/jackson-coreutils/src/main/java/com/github/fge/jackson/jsonpointer/ReferenceToken.java:65: warning: [MutableConstantField] Constant field declarations should use the immutable type (such as ImmutableList) instead of the general collection interface type (such as List)
    private static final List<Character> DECODED = ImmutableList.of('~', '/');
                             ^
    (see https://errorprone.info/bugpattern/MutableConstantField)
  Did you mean 'private static final ImmutableList<Character> DECODED = ImmutableList.of('~', '/');'?
/home/travis/build/java-json-tools/jackson-coreutils/src/main/java/com/github/fge/jackson/JacksonUtils.java:96: warning: [MixedMutabilityReturnType] This method returns both mutable and immutable collections or maps from different paths. This may be confusing for users of the method.
    public static Map<String, JsonNode> asMap(final JsonNode node)
                                        ^
    (see https://errorprone.info/bugpattern/MixedMutabilityReturnType)
  Did you mean 'public static ImmutableMap<String, JsonNode> asMap(final JsonNode node)'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions