aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-pmd-plugin/src
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-03-27 23:43:19 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-03-27 23:43:19 +0200
commitd4ae5228bb668e65baa644b52d41286d5f3d55cd (patch)
tree8b3f18401fade28db31c1b9364e2f4ebad2b017d /plugins/sonar-pmd-plugin/src
parent2b560c35ab24a4f7db27d7e180a64e830b9a56a1 (diff)
downloadsonarqube-d4ae5228bb668e65baa644b52d41286d5f3d55cd.tar.gz
sonarqube-d4ae5228bb668e65baa644b52d41286d5f3d55cd.zip
Fix coding violations
Diffstat (limited to 'plugins/sonar-pmd-plugin/src')
-rw-r--r--plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java
index e1552a340f7..e60b2b06748 100644
--- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java
+++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
import org.sonar.api.BatchExtension;
import org.sonar.api.resources.Java;
import org.sonar.api.resources.Project;
+import org.sonar.api.utils.SonarException;
import org.sonar.api.utils.TimeProfiler;
import org.sonar.java.api.JavaUtils;
@@ -122,7 +123,7 @@ public class PmdExecutor implements BatchExtension {
return stream;
} catch (FileNotFoundException e) {
- throw new RuntimeException("The PMD ruleset can not be found: " + rulesetPath);
+ throw new SonarException("The PMD ruleset can not be found: " + rulesetPath, e);
}
}
@@ -159,7 +160,7 @@ public class PmdExecutor implements BatchExtension {
LOG.info("Java version: " + javaVersion);
pmd.setJavaVersion(sourceType);
} else {
- throw new RuntimeException("Unsupported Java version for PMD: " + javaVersion);
+ throw new SonarException("Unsupported Java version for PMD: " + javaVersion);
}
}
}