File tree 3 files changed +4
-23
lines changed
3 files changed +4
-23
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ public static Collection<String[]> parameters() {
71
71
{"ExcessiveImports" },
72
72
{"PositionLiteralsFirstInComparisons" },
73
73
{"MissingSerialVersionUID" },
74
+ {"CallSuperInConstructor" },
74
75
}
75
76
);
76
77
}
Original file line number Diff line number Diff line change @@ -615,24 +615,4 @@ public void allowsDuplicateLiteralsInAnnotations() throws Exception {
615
615
)
616
616
).validate ();
617
617
}
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
- }
638
618
}
Original file line number Diff line number Diff line change 1
1
package foo ;
2
2
3
- public final class DontCallSuperInConstructor {
3
+ public final class CallSuperInConstructor {
4
4
5
5
private final int number ;
6
6
private final int other ;
7
7
8
- public DontCallSuperInConstructor (final int parameter ) {
8
+ public CallSuperInConstructor (final int parameter ) {
9
9
this (parameter , parameter * 2 );
10
10
}
11
11
12
- public DontCallSuperInConstructor (final int parameter , final int other ) {
12
+ public CallSuperInConstructor (final int parameter , final int other ) {
13
13
this .number = parameter ;
14
14
this .another = other ;
15
15
}
You can’t perform that action at this time.
0 commit comments