diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-08-20 12:26:24 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-08-20 12:26:24 +0200 |
commit | cfd9912407a505d6005d70f89ffc01c2d19b7ab4 (patch) | |
tree | bcb920437ce0055791f01d994dc3560d99e63e58 /sonar-maven-plugin/src | |
parent | ab09254608fa6dcf5595891d9070e4d9faf21276 (diff) | |
download | sonarqube-cfd9912407a505d6005d70f89ffc01c2d19b7ab4.tar.gz sonarqube-cfd9912407a505d6005d70f89ffc01c2d19b7ab4.zip |
Fix quality flaws
Diffstat (limited to 'sonar-maven-plugin/src')
-rw-r--r-- | sonar-maven-plugin/src/main/java/org/sonar/maven/ExceptionHandling.java | 6 |
1 files changed, 5 insertions, 1 deletions
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()); |