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

updated PMD;

updated own PMD rules
parent 90536bf2
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
<rule ref="rulesets/java/codesize.xml" />
<!-- <rule ref="rulesets/java/comments.xml" /> -->
<!-- <rule ref="rulesets/java/controversial.xml" /> -->
<rule ref="rulesets/java/coupling.xml" />
<!-- <rule ref="rulesets/java/coupling.xml" /> -->
<rule ref="rulesets/java/design.xml" />
<rule ref="rulesets/java/empty.xml" />
<rule ref="rulesets/java/finalizers.xml" />
......@@ -28,7 +28,7 @@
<rule ref="rulesets/java/logging-java.xml" />
<rule ref="rulesets/java/migrating.xml" />
<rule ref="rulesets/java/naming.xml" />
<!-- <rule ref="rulesets/java/naming.xml" /> -->
<!-- <rule ref="rulesets/java/optimizations.xml" /> -->
<rule ref="rulesets/java/strictexception.xml" />
<rule ref="rulesets/java/strings.xml" />
......@@ -43,11 +43,11 @@
<rule ref="rulesets/jsp/basic-jsf.xml" />
<rule ref="rulesets/jsp/basic.xml" />
<!-- <rule ref="rulesets/vm/basic.xml" /> -->
<!-- <rule ref="rulesets/vm/basic.xml" /> -->
<!-- <rule ref="rulesets/xml/basic.xml" /> -->
<!-- <rule ref="rulesets/xml/basic.xml" /> -->
<!-- <rule ref="rulesets/xsl/xpath.xml" /> -->
<!-- <rule ref="rulesets/xsl/xpath.xml" /> -->
<!-- custom adaptations -->
......@@ -57,6 +57,7 @@
<rule ref="rulesets/java/comments.xml">
<exclude name="CommentRequired" />
<exclude name="CommentSize" />
</rule>
<rule ref="rulesets/java/controversial.xml">
......@@ -64,6 +65,10 @@
<exclude name="AvoidUsingVolatile" />
</rule>
<rule ref="rulesets/java/coupling.xml">
<exclude name="LawOfDemeter" />
</rule>
<rule ref="rulesets/java/j2ee.xml">
<exclude name="DoNotUseThreads" />
</rule>
......@@ -72,6 +77,10 @@
<exclude name="BeanMembersShouldSerialize" />
</rule>
<rule ref="rulesets/java/naming.xml">
<exclude name="LongVariable" />
</rule>
<rule ref="rulesets/java/naming.xml/VariableNamingConventions">
<priority>5</priority>
</rule>
......@@ -80,7 +89,13 @@
<exclude name="LocalVariableCouldBeFinal" />
<exclude name="SimplifyStartsWith" />
</rule>
<rule ref="rulesets/chw/basic.xml" />
<rule ref="rulesets/chw/basic.xml/NonHeaderCommentSize">
<properties>
<property name="maxLineLength" value="100" />
</properties>
</rule>
</ruleset>
\ No newline at end of file
File deleted
File added
......@@ -269,14 +269,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.4</version>
<version>3.5</version>
<dependencies>
<dependency>
<groupId>de.chw</groupId>
<artifactId>pmd.ruleset</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/conf/quality-config/pmd/CustomPmdRules_1.0.0.201505130542.jar</systemPath>
<systemPath>${project.basedir}/conf/quality-config/pmd/CustomPmdRules_1.0.0.201507080630.jar</systemPath>
</dependency>
</dependencies>
<configuration>
......
......@@ -36,7 +36,7 @@ public abstract class AbstractInterThreadPipe extends AbstractPipe {
private final BlockingQueue<ISignal> signalQueue;
private volatile boolean isClosed;
private volatile boolean closed;
protected <T> AbstractInterThreadPipe(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) {
super(sourcePort, targetPort);
......@@ -85,11 +85,11 @@ public abstract class AbstractInterThreadPipe extends AbstractPipe {
@Override
public final boolean isClosed() {
return isClosed;
return closed;
}
@Override
public final void close() {
isClosed = true;
closed = true;
}
}
......@@ -19,7 +19,7 @@ import teetime.framework.signal.ISignal;
public abstract class AbstractIntraThreadPipe extends AbstractPipe {
private boolean isClosed;
private boolean closed;
protected <T> AbstractIntraThreadPipe(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) {
super(sourcePort, targetPort);
......@@ -31,8 +31,8 @@ public abstract class AbstractIntraThreadPipe extends AbstractPipe {
}
@Override
// getTargetPort is always non-null since the framework adds dummy ports if necessary
public final void sendSignal(final ISignal signal) {
// getTargetPort is always non-null since the framework adds dummy ports if necessary
this.cachedTargetStage.onSignal(signal, this.getTargetPort());
}
......@@ -43,12 +43,12 @@ public abstract class AbstractIntraThreadPipe extends AbstractPipe {
@Override
public boolean isClosed() {
return isClosed;
return closed;
}
@Override
public void close() {
isClosed = true;
closed = true;
}
@SuppressWarnings("PMD.EmptyMethodInAbstractClassShouldBeAbstract")
......
......@@ -54,6 +54,7 @@ public abstract class AbstractPort<T> {
this.pipe = pipe;
}
@SuppressWarnings("PMD.ConfusingTernary")
@Override
public String toString() {
return (name != null) ? name : super.toString();
......
......@@ -315,7 +315,7 @@ public abstract class AbstractStage extends Stage {
((DynamicOutputPort<?>) outputPort).setIndex(i);
}
}
outputPorts = tempOutputPorts.toArray(new OutputPort[0]);
outputPorts = tempOutputPorts.toArray(new OutputPort[tempOutputPorts.size()]);
firePortRemoved(removedOutputPort);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment