From cfd9912407a505d6005d70f89ffc01c2d19b7ab4 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 20 Aug 2013 12:26:24 +0200 Subject: Fix quality flaws --- .../src/main/java/org/sonar/maven/ExceptionHandling.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sonar-maven-plugin/src') diff --git a/sonar-maven-plugin/src/main/java/org/sonar/maven/ExceptionHandling.java b/sonar-maven-plugin/src/main/java/org/sonar/maven/ExceptionHandling.java index 2fcd44e55e2..2baf46278d7 100644 --- a/sonar-maven-plugin/src/main/java/org/sonar/maven/ExceptionHandling.java +++ b/sonar-maven-plugin/src/main/java/org/sonar/maven/ExceptionHandling.java @@ -24,9 +24,13 @@ import org.apache.maven.plugin.logging.Log; class ExceptionHandling { + private ExceptionHandling(){ + // Hide public constructor + } + static RuntimeException handle(Exception e, Log log) throws MojoExecutionException { Throwable source = e; - if (e.getClass().getName().equals("org.sonar.runner.impl.RunnerException") && e.getCause() != null) { + if ("org.sonar.runner.impl.RunnerException".equals(e.getClass().getName()) && e.getCause() != null) { source = e.getCause(); } log.error(source.getMessage()); -- cgit v1.2.3