Skip to content

Commit 3f678dd

Browse files
committedFeb 8, 2019
For #982: Disabled CallSuperInConstructor rule.
1 parent ef690f5 commit 3f678dd

File tree

3 files changed

+4
-23
lines changed

3 files changed

+4
-23
lines changed
 

‎qulice-pmd/src/test/java/com/qulice/pmd/PmdDisabledRulesTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public static Collection<String[]> parameters() {
7171
{"ExcessiveImports"},
7272
{"PositionLiteralsFirstInComparisons"},
7373
{"MissingSerialVersionUID"},
74+
{"CallSuperInConstructor"},
7475
}
7576
);
7677
}

‎qulice-pmd/src/test/java/com/qulice/pmd/PmdValidatorTest.java

-20
Original file line numberDiff line numberDiff line change
@@ -615,24 +615,4 @@ public void allowsDuplicateLiteralsInAnnotations() throws Exception {
615615
)
616616
).validate();
617617
}
618-
619-
/**
620-
* PmdValidator does not require constructor with super().
621-
*
622-
* @throws Exception If something wrong happens inside.
623-
*/
624-
@Test
625-
public void dontRequireSuperInConstructor()
626-
throws Exception {
627-
final String file = "DontCallSuperInConstructor.java";
628-
new PmdAssert(
629-
file,
630-
new IsEqual<>(true),
631-
new IsNot<>(
632-
new StringContains(
633-
"CallSuperInConstructor"
634-
)
635-
)
636-
).validate();
637-
}
638618
}

‎qulice-pmd/src/test/resources/com/qulice/pmd/DontCallSuperInConstructor.java ‎qulice-pmd/src/test/resources/com/qulice/pmd/CallSuperInConstructor.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package foo;
22

3-
public final class DontCallSuperInConstructor {
3+
public final class CallSuperInConstructor {
44

55
private final int number;
66
private final int other;
77

8-
public DontCallSuperInConstructor(final int parameter) {
8+
public CallSuperInConstructor(final int parameter) {
99
this(parameter, parameter * 2);
1010
}
1111

12-
public DontCallSuperInConstructor(final int parameter, final int other) {
12+
public CallSuperInConstructor(final int parameter, final int other) {
1313
this.number = parameter;
1414
this.another = other;
1515
}

0 commit comments

Comments
 (0)
Please sign in to comment.