java-json-tools / jackson-coreutils

JSON Pointer (RFC 6901) and numeric JSON equivalence for Jackson (2.2.x)
Other
5 stars 6 forks source link

ErrorProne reports #26

Closed Capstan closed 5 years ago

Capstan commented 5 years ago
/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)'?