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

deactivated PMD's UR anomaly rule

parent 8d089dd8
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,14 @@ ...@@ -65,6 +65,14 @@
<exclude name="AvoidUsingVolatile" /> <exclude name="AvoidUsingVolatile" />
</rule> </rule>
<!-- UR means "undefined reference" which is already detected by the compiler.
so we deactivate it. -->
<rule ref="rulesets/java/controversial.xml/DataflowAnomalyAnalysis">
<properties>
<property name="violationSuppressRegex" value="^Found 'UR'-anomaly.*" />
</properties>
</rule>
<rule ref="rulesets/java/coupling.xml"> <rule ref="rulesets/java/coupling.xml">
<exclude name="LawOfDemeter" /> <exclude name="LawOfDemeter" />
</rule> </rule>
......
...@@ -66,10 +66,7 @@ class ExecutionInstantiation { ...@@ -66,10 +66,7 @@ class ExecutionInstantiation {
final OutputPort outputPort, final InstantiationPipe pipe) { final OutputPort outputPort, final InstantiationPipe pipe) {
Stage targetStage = pipe.getTargetPort().getOwningStage(); Stage targetStage = pipe.getTargetPort().getOwningStage();
int targetColor = DEFAULT_COLOR; int targetColor = colors.containsKey(targetStage) ? colors.get(targetStage) : DEFAULT_COLOR;
if (colors.containsKey(targetStage)) {
targetColor = colors.get(targetStage);
}
if (threadableStages.contains(targetStage) && targetColor != color) { if (threadableStages.contains(targetStage) && targetColor != color) {
if (pipe.capacity() != 0) { if (pipe.capacity() != 0) {
......
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