diff --git a/pom.xml b/pom.xml index 319f8c82e..b27976e4b 100644 --- a/pom.xml +++ b/pom.xml @@ -593,7 +593,7 @@ .*.api.AbstractViolationReporter10090 .*.api.AnnotationUtility6060 .*.api.AuditEvent10093 - .*.api.AutomaticBean9074 + .*.api.AutomaticBean9082 .*.api.AutomaticBean\$.*7590 .*.api.Check10086 .*.api.Comment10095 diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java index 57ba6b242..5bf62658b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java @@ -155,27 +155,16 @@ public class AutomaticBean + configuration.getName() + " to '" + value + "': " + e.getTargetException().getMessage(), e); } - catch (final IllegalAccessException e) { + catch (final IllegalAccessException | NoSuchMethodException e) { throw new CheckstyleException( "cannot access " + key + " in " + this.getClass().getName(), e); } - catch (final NoSuchMethodException e) { - throw new CheckstyleException( - "cannot access " + key + " in " - + this.getClass().getName(), e); - } - catch (final IllegalArgumentException e) { + catch (final IllegalArgumentException | ConversionException e) { throw new CheckstyleException( "illegal value '" + value + "' for property '" + key + "' of module " + configuration.getName(), e); } - catch (final ConversionException e) { - throw new CheckstyleException( - "illegal value '" + value + "' for property '" + key - + "' of module " + configuration.getName(), e); - } - } finishLocalSetup(); @@ -219,12 +208,7 @@ public class AutomaticBean "cannot access " + key + " in " + this.getClass().getName(), e); } - catch (final IllegalArgumentException e) { - throw new CheckstyleException( - "illegal value '" + value + "' for property '" + key - + "' of bean " + this.getClass().getName(), e); - } - catch (final ConversionException e) { + catch (final IllegalArgumentException | ConversionException e) { throw new CheckstyleException( "illegal value '" + value + "' for property '" + key + "' of bean " + this.getClass().getName(), e); diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java index 64e4b7583..ec5d1c518 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java @@ -35,9 +35,8 @@ import org.apache.commons.logging.LogFactory; */ public class HandlerFactory { - /** Logger for indentation check */ - private static final Log LOG = - LogFactory.getLog("com.puppycrawl.tools.checkstyle.checks.indentation"); + /** Logger for indentation check. */ + private static final Log LOG = LogFactory.getLog(HandlerFactory.class); /** * Registered handlers.