Skip to content

Commit

Permalink
Enforce errorprone UnnecessaryParentheses (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr authored Mar 5, 2024
1 parent 43c8142 commit 68be752
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private void registerAuthFilters(Environment environment, Injector injector)
{
environment
.jersey()
.register(new AuthDynamicFeature((injector.getInstance(AuthFilter.class))));
.register(new AuthDynamicFeature(injector.getInstance(AuthFilter.class)));
logger.info("op=register type=auth filter item={}", AuthFilter.class);
environment.jersey().register(RolesAllowedDynamicFeature.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected String plainTextFromGz(byte[] compressed)

protected boolean isCompressed(final byte[] compressed)
{
return (compressed[0] == (byte) (GZIPInputStream.GZIP_MAGIC))
return (compressed[0] == (byte) GZIPInputStream.GZIP_MAGIC)
&& (compressed[1] == (byte) (GZIPInputStream.GZIP_MAGIC >> 8));
}
}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne \
-Xep:UnnecessaryParentheses:ERROR \
-Xep:UnusedVariable:ERROR</arg>
</compilerArgs>
<annotationProcessorPaths>
Expand Down

0 comments on commit 68be752

Please sign in to comment.