Skip to content
Snippets Groups Projects
Commit 0c2a8872 authored by Christian Wulf's avatar Christian Wulf
Browse files

removed rulesets/java/j2see#DoNotUseThreads

parent 539c2bce
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
<local-check-config name="TeeTime" location="conf/quality-config/cs-conf.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="TeeTime" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
<local-check-config name="maven-checkstyle-plugin default" location="file:/C:/Users/chw/Repositories/teetime/conf/quality-config/cs-conf.xml" type="remote" description="maven-checkstyle-plugin configuration default">
<property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
<property name="checkstyle.header.file" value="C:\Users\chw\Repositories\teetime\target\checkstyle-header-default.txt"/>
</local-check-config>
<fileset name="java-sources-default" enabled="true" check-config-name="maven-checkstyle-plugin default" local="true">
<file-match-pattern match-pattern="src/main/java/.*\.java" include-pattern="true"/>
<file-match-pattern match-pattern="src/test/java/.*\.java" include-pattern="true"/>
<file-match-pattern match-pattern="src/main/resources/.*\.properties" include-pattern="true"/>
<file-match-pattern match-pattern="src/test/resources/.*\.properties" include-pattern="true"/>
</fileset>
</fileset-config>
......@@ -25,11 +25,17 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
<nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
#FindBugs User Preferences
#Tue Dec 16 13:48:45 CET 2014
#Tue Dec 16 15:34:05 CET 2014
detector_threshold=3
effort=max
excludefilter0=.fbExcludeFilterFile|true
......
......@@ -21,7 +21,7 @@
<rule ref="rulesets/java/empty.xml" />
<rule ref="rulesets/java/finalizers.xml" />
<rule ref="rulesets/java/imports.xml" />
<rule ref="rulesets/java/j2ee.xml" />
<!-- <rule ref="rulesets/java/j2ee.xml" /> -->
<rule ref="rulesets/java/javabeans.xml" />
<rule ref="rulesets/java/junit.xml" />
<rule ref="rulesets/java/logging-jakarta-commons.xml" />
......@@ -63,6 +63,10 @@
<exclude name="AtLeastOneConstructor" />
</rule>
<rule ref="rulesets/java/j2ee.xml">
<exclude name="DoNotUseThreads" />
</rule>
<rule ref="rulesets/java/naming.xml/VariableNamingConventions">
<priority>5</priority>
</rule>
......
......@@ -32,7 +32,7 @@ public abstract class AbstractInterThreadPipe extends AbstractPipe {
}
@Override
public void reportNewElement() { // NOPMD
public void reportNewElement() {
// do nothing
}
}
......@@ -12,7 +12,7 @@ public class AnalysisConfiguration {
public AnalysisConfiguration() {}
List<Stage> getThreadableStageJobs() { // NOPMD only Analysis should use this method
List<Stage> getThreadableStageJobs() {
return this.threadableStageJobs;
}
......
......@@ -11,7 +11,7 @@ import teetime.framework.validation.AnalysisNotValidException;
public class RunnableStage implements Runnable {
private final Stage stage;
private final Logger logger; // NOPMD
private final Logger logger;
private boolean validationEnabled;
public RunnableStage(final Stage stage) {
......
......@@ -10,7 +10,7 @@ import org.slf4j.LoggerFactory;
import teetime.framework.signal.ISignal;
import teetime.framework.validation.InvalidPortConnection;
public abstract class Stage { // NOPMD (should not start with "Abstract")
public abstract class Stage {
private static final ConcurrentMap<String, Integer> INSTANCES_COUNTER = new ConcurrentHashMap<String, Integer>();
......@@ -18,7 +18,7 @@ public abstract class Stage { // NOPMD (should not start with "Abstract")
/**
* A unique logger instance per stage instance
*/
protected final Logger logger; // NOPMD
protected final Logger logger;
protected Stage() {
this.id = this.createId();
......@@ -47,7 +47,7 @@ public abstract class Stage { // NOPMD (should not start with "Abstract")
return newId;
}
static void clearInstanceCounters() { // NOPMD (package-private to clear map in tests)
static void clearInstanceCounters() {
INSTANCES_COUNTER.clear();
}
......
......@@ -18,8 +18,8 @@ public final class FileSearcher {
final List<URL> list = new ArrayList<URL>();
final Enumeration<URL> systemRes = CLASS_LOADER.getResources(name);
while (systemRes.hasMoreElements()) { // NOPMD
list.add(systemRes.nextElement()); // NOPMD
while (systemRes.hasMoreElements()) {
list.add(systemRes.nextElement());
}
return list;
}
......
......@@ -17,7 +17,7 @@ public class CommittableResizableArrayQueue<T> implements CommittableQueue<T> {
this.elements = this.arrayPool.acquire(initialCapacity + 1);
this.elements[0] = (T) emptyObject; // optimization: avoids the use of an index out-of-bounds check
this.clear(); // NOPMD
this.clear();
}
@Override
......
......@@ -16,19 +16,19 @@ public class FileSearcherTest {
@Test
public void fileInClasspath() throws IOException {
final List<URL> list = FileSearcher.loadResources("pipe-factories.conf");
Assert.assertEquals(false, list.isEmpty()); // NOPMD
Assert.assertEquals(false, list.isEmpty());
}
@Test
public void multipleFiles() throws IOException {
final List<URL> list = FileSearcher.loadResources("LICENSE.txt");
Assert.assertEquals(true, list.size() > 1); // NOPMD
Assert.assertEquals(true, list.size() > 1);
}
@Test
public void missingFile() throws IOException {
final List<URL> list = FileSearcher.loadResources("filethatdoesnotexistinanyproject.nope");
Assert.assertEquals(true, list.isEmpty()); // NOPMD
Assert.assertEquals(true, list.isEmpty());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment