pmd: Remove hack related to multithreading in jdk5 with Eclipse - no longer relevant today

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7457 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Romain Pelisse committed 2011-11-17 15:14:10 +00:00
1 parent 0aa0179ae5
commit 720bb3d3b4
1 file changed
+1 -23
+1 -23
View File
@@ -64,30 +64,8 @@ public class PMD {
public static final String VERSION = "@@VERSION@@";
public static final String SUPPRESS_MARKER = "NOPMD";
/**
* Do we have proper permissions to use multithreading?
*/
// FUTURE Move this into the SystemUtils
private static final boolean MT_SUPPORTED;
private static final int MISSING_RULESETS = 0;
static {
boolean error = false;
try {
/*
* ant task ran from Eclipse with jdk 1.5.0 raises an AccessControlException
* when shutdown is called. Standalone pmd or ant from command line are fine.
*
* With jdk 1.6.0, ant task from Eclipse also works.
*/
ExecutorService executor = Executors.newFixedThreadPool(1);
executor.shutdown();
} catch (RuntimeException e) {
error = true;
}
MT_SUPPORTED = !error;
}
protected final Configuration configuration;
@@ -480,7 +458,7 @@ public class PMD {
* ExecutorService can also be disabled if threadCount is not positive, e.g. using the
* "-threads 0" command line option.
*/
boolean useMT = MT_SUPPORTED && configuration.getThreads() > 0;
boolean useMT = configuration.getThreads() > 0;
if (configuration.isStressTest()) {
// randomize processing order