Enable checkstyle's Indentation module

This commit is contained in:
jvoisin
2019-08-07 20:13:29 +00:00
committed by GitHub
parent fabed228da
commit 7578ee9537
19 changed files with 77 additions and 84 deletions
@@ -171,7 +171,7 @@ public class MainController {
}
return new ModelAndView(view, "model", map);
}
}
private <T> boolean trimToSize(Boolean showAll, List<T> list, int userPaginationPreference) {
boolean trimmed = false;
@@ -42,7 +42,7 @@ public class SettingsController {
@Autowired
private SecurityService securityService;
@GetMapping
@GetMapping
protected ModelAndView handleRequestInternal(HttpServletRequest request) throws Exception {
User user = securityService.getCurrentUser(request);
@@ -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
if(StringUtils.contains(authentication.getRequestedPath(), "/WEB-INF/jsp/")) {
logger.warn("BYPASSING AUTH FOR WEB-INF page");
} else
if(!roughlyEqual(path.asString(), authentication.getRequestedPath())) {
} else if(!roughlyEqual(path.asString(), authentication.getRequestedPath())) {
throw new InsufficientAuthenticationException("Credentials not valid for path " + authentication
.getRequestedPath() + ". They are valid for " + path.asString());
}
@@ -140,13 +140,7 @@ public final class FileUtil {
}
private static <T> T timed(FileTask<T> task) {
// long t0 = System.nanoTime();
// try {
return task.execute();
// } finally {
// long t1 = System.nanoTime();
// LOG.debug((t1 - t0) / 1000L + " microsec, " + task);
// }
}
private abstract static class FileTask<T> {
+1
View File
@@ -24,6 +24,7 @@
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<module name="Indentation"/>
<module name="InnerAssignment"/>
<module name="RedundantImport"/>
<module name="StringLiteralEquality"/>