Skip to content
New issue

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

Address Error Prone warnings #55

Open
armiol opened this issue Jan 30, 2019 · 0 comments
Open

Address Error Prone warnings #55

armiol opened this issue Jan 30, 2019 · 0 comments

Comments

@armiol
Copy link
Contributor

armiol commented Jan 30, 2019

As of this moment there is a couple of warnings to address:

/Users/foobar/development/Spine/web/web/src/main/java/io/spine/web/parser/Base64MessageParser.java:77: warning: [ImmutableEnumChecker] enums should be immutable: 'LogSingleton' has field 'value' of type 'org.slf4j.Logger', the declaration of type 'org.slf4j.Logger' is not annotated with @com.google.errorprone.annotations.Immutable
        private final Logger value = LoggerFactory.getLogger(Base64MessageParser.class);
                             ^
    (see https://errorprone.info/bugpattern/ImmutableEnumChecker)
/Users/foobar/development/Spine/web/web/src/main/java/io/spine/web/parser/JsonMessageParser.java:130: warning: [ImmutableEnumChecker] enums should be immutable: 'LogSingleton' has field 'value' of type 'org.slf4j.Logger', the declaration of type 'org.slf4j.Logger' is not annotated with @com.google.errorprone.annotations.Immutable
        private final Logger value = LoggerFactory.getLogger(JsonMessageParser.class);
                             ^
    (see https://errorprone.info/bugpattern/ImmutableEnumChecker)
2 warnings

and

Task :firebase-web:compileTestJava
/Users/foobar/development/Spine/web/firebase-web/src/test/java/io/spine/web/firebase/given/FirebaseQueryMediatorTestEnv.java:53: warning: [BadImport] Importing nested classes/static methods/static fields with commonly-used names can make code harder to read, because it may not be clear from the context exactly which type is being referred to. Qualifying the name with that of the containing class can make the code clearer.
            this.response = copyOf(messages).stream()
                            ^
    (see https://errorprone.info/bugpattern/BadImport)
  Did you mean 'this.response = ImmutableSet.copyOf(messages).stream()'?
/Users/foobar/development/Spine/web/firebase-web/src/test/java/io/spine/web/firebase/HasChildren.java:56: warning: [BadImport] Importing nested classes/static methods/static fields with commonly-used names can make code harder to read, because it may not be clear from the context exactly which type is being referred to. Qualifying the name with that of the containing class can make the code clearer.
        this.expected = copyOf(expected);
                        ^
    (see https://errorprone.info/bugpattern/BadImport)
  Did you mean 'this.expected = ImmutableMap.copyOf(expected);'?
/Users/foobar/development/Spine/web/firebase-web/src/test/java/io/spine/web/firebase/FirebaseClientFactoryTest.java:36: warning: [BadImport] Importing nested classes/static methods/static fields with commonly-used names can make code harder to read, because it may not be clear from the context exactly which type is being referred to. Qualifying the name with that of the containing class can make the code clearer.
    private static final DatabaseUrl SOME_URL = from("https://someUrl.com");
                                                ^
    (see https://errorprone.info/bugpattern/BadImport)
  Did you mean 'private static final DatabaseUrl SOME_URL = DatabaseUrl.from("https:'?
3 warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant