Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Mar 13, 2024
2 parents 130d14d + 2fcfc77 commit e7dc3a6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions qulice-pmd/src/test/java/com/qulice/pmd/PmdValidatorTest.java
Expand Up @@ -42,6 +42,8 @@
import org.hamcrest.core.IsEqual;
import org.hamcrest.core.IsNot;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

/**
* Test case for {@link PmdValidator} class.
Expand Down Expand Up @@ -716,4 +718,20 @@ void allowJunitTestClassToBeFinal() throws Exception {
)
).validate();
}

/**
* PmdValidator can allow record classes.
* @throws Exception If something wrong happens inside.
*/
@Test
@EnabledForJreRange(min = JRE.JAVA_14, max = JRE.JAVA_21)
void allowRecordClasses() throws Exception {
new PmdAssert(
"RecordParsed.java",
Matchers.is(true),
Matchers.not(
Matchers.containsString(PmdValidatorTest.STATIC_METHODS)
)
).validate();
}
}
@@ -0,0 +1,8 @@
package foo;

public record RecordParsed(
Object symbol,
int line,
String msg
) {
}

0 comments on commit e7dc3a6

Please sign in to comment.