diff --git a/build.gradle b/build.gradle index 915c01b913..a8533c903b 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,8 @@ subprojects { project -> "-Xlint:deprecation", "-Xlint:rawtypes", "-Xlint:unchecked", - "-Werror" + "-Werror", + "-parameters", ] options.errorprone { // disable warnings in generated code; AutoValue code fails UnnecessaryParentheses check diff --git a/nullaway/src/test/java/com/uber/nullaway/DummyOptionsConfigTest.java b/nullaway/src/test/java/com/uber/nullaway/DummyOptionsConfigTest.java index cefcb5cd76..b803b94d12 100644 --- a/nullaway/src/test/java/com/uber/nullaway/DummyOptionsConfigTest.java +++ b/nullaway/src/test/java/com/uber/nullaway/DummyOptionsConfigTest.java @@ -50,7 +50,7 @@ public void allDeclaredMethodsThrowIllegalStateException() { Throwable cause = reflectionException.getCause(); assertThat(cause, instanceOf(IllegalStateException.class)); IllegalStateException exception = (IllegalStateException) cause; - assertEquals(exception.getMessage(), DummyOptionsConfig.ERROR_MESSAGE); + assertEquals(DummyOptionsConfig.ERROR_MESSAGE, exception.getMessage()); } } } diff --git a/nullaway/src/test/java/com/uber/nullaway/LegacyAndJspecifyModeTest.java b/nullaway/src/test/java/com/uber/nullaway/LegacyAndJspecifyModeTest.java index ebc90f202a..374711a5da 100644 --- a/nullaway/src/test/java/com/uber/nullaway/LegacyAndJspecifyModeTest.java +++ b/nullaway/src/test/java/com/uber/nullaway/LegacyAndJspecifyModeTest.java @@ -42,6 +42,6 @@ public void testIllegalStateExceptionUsingReflection() throws Exception { Throwable cause = exception.getCause(); assertThat(cause, instanceOf(IllegalStateException.class)); - assertEquals(cause.getMessage(), ERROR); + assertEquals(ERROR, cause.getMessage()); } }