Enable checkstyle's Indentation module

master
jvoisin 5 years ago committed by GitHub
parent fabed228da
commit 7578ee9537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      airsonic-main/src/main/java/org/airsonic/player/security/JWTAuthenticationProvider.java
  2. 6
      airsonic-main/src/main/java/org/airsonic/player/util/FileUtil.java
  3. 1
      checkstyle.xml

@ -46,9 +46,7 @@ public class JWTAuthenticationProvider implements AuthenticationProvider {
// TODO:AD This is super unfortunate, but not sure there is a better way when using JSP // TODO:AD This is super unfortunate, but not sure there is a better way when using JSP
if(StringUtils.contains(authentication.getRequestedPath(), "/WEB-INF/jsp/")) { if(StringUtils.contains(authentication.getRequestedPath(), "/WEB-INF/jsp/")) {
logger.warn("BYPASSING AUTH FOR WEB-INF page"); logger.warn("BYPASSING AUTH FOR WEB-INF page");
} else } else if(!roughlyEqual(path.asString(), authentication.getRequestedPath())) {
if(!roughlyEqual(path.asString(), authentication.getRequestedPath())) {
throw new InsufficientAuthenticationException("Credentials not valid for path " + authentication throw new InsufficientAuthenticationException("Credentials not valid for path " + authentication
.getRequestedPath() + ". They are valid for " + path.asString()); .getRequestedPath() + ". They are valid for " + path.asString());
} }

@ -140,13 +140,7 @@ public final class FileUtil {
} }
private static <T> T timed(FileTask<T> task) { private static <T> T timed(FileTask<T> task) {
// long t0 = System.nanoTime();
// try {
return task.execute(); return task.execute();
// } finally {
// long t1 = System.nanoTime();
// LOG.debug((t1 - t0) / 1000L + " microsec, " + task);
// }
} }
private abstract static class FileTask<T> { private abstract static class FileTask<T> {

@ -24,6 +24,7 @@
<module name="EmptyStatement"/> <module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/> <module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/> <module name="EqualsHashCode"/>
<module name="Indentation"/>
<module name="InnerAssignment"/> <module name="InnerAssignment"/>
<module name="RedundantImport"/> <module name="RedundantImport"/>
<module name="StringLiteralEquality"/> <module name="StringLiteralEquality"/>

Loading…
Cancel
Save