File tree Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -163,19 +163,19 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
163163 <dependency >
164164 <groupId >org.junit.jupiter</groupId >
165165 <artifactId >junit-jupiter-api</artifactId >
166- <version >5.3.1 </version >
166+ <version >5.10.2 </version >
167167 <scope >test</scope >
168168 </dependency >
169169 <dependency >
170170 <groupId >org.junit.jupiter</groupId >
171171 <artifactId >junit-jupiter-engine</artifactId >
172- <version >5.3.1 </version >
172+ <version >5.10.2 </version >
173173 <scope >test</scope >
174174 </dependency >
175175 <dependency >
176176 <groupId >org.junit.jupiter</groupId >
177177 <artifactId >junit-jupiter-params</artifactId >
178- <version >5.3.1 </version >
178+ <version >5.10.2 </version >
179179 <scope >test</scope >
180180 </dependency >
181181 <dependency >
Original file line number Diff line number Diff line change 4242import org .hamcrest .core .IsEqual ;
4343import org .hamcrest .core .IsNot ;
4444import org .junit .jupiter .api .Test ;
45+ import org .junit .jupiter .api .condition .EnabledForJreRange ;
46+ import org .junit .jupiter .api .condition .JRE ;
4547
4648/**
4749 * Test case for {@link PmdValidator} class.
@@ -716,4 +718,20 @@ void allowJunitTestClassToBeFinal() throws Exception {
716718 )
717719 ).validate ();
718720 }
721+
722+ /**
723+ * PmdValidator can allow record classes.
724+ * @throws Exception If something wrong happens inside.
725+ */
726+ @ Test
727+ @ EnabledForJreRange (min = JRE .JAVA_14 , max = JRE .JAVA_21 )
728+ void allowRecordClasses () throws Exception {
729+ new PmdAssert (
730+ "RecordParsed.java" ,
731+ Matchers .is (true ),
732+ Matchers .not (
733+ Matchers .containsString (PmdValidatorTest .STATIC_METHODS )
734+ )
735+ ).validate ();
736+ }
719737}
Original file line number Diff line number Diff line change 1+ package foo ;
2+
3+ public record RecordParsed (
4+ Object symbol ,
5+ int line ,
6+ String msg
7+ ) {
8+ }
You can’t perform that action at this time.
0 commit comments