Skip to content

Commit 99e18ff

Browse files
committed
chore: Update PMD to match Eclipse plug-in 4.44.0.v20230225-1718-r
Updates the POM and addresses errors from new rules.
1 parent 4590dca commit 99e18ff

File tree

7 files changed

+18
-5
lines changed

7 files changed

+18
-5
lines changed

module/jsonurl-core/src/main/java/org/jsonurl/text/NumberBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public NumberBuilder(
300300
BigMathProvider mcp,
301301
Set<JsonUrlOption> options) {
302302
this.mcp = mcp;
303-
parse(text, start, stop, options);
303+
parse(text, start, stop, options); // NOPMD - ConstructorCallsOverridableMethod
304304
}
305305

306306
/**

module/jsonurl-core/src/test/java/org/jsonurl/stream/JsonUrlIteratorTest.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
*/
4747
@SuppressWarnings({
4848
"PMD.AvoidDuplicateLiterals",
49-
"PMD.ExcessiveClassLength" // yup, I have a lot of tests
49+
"PMD.ExcessiveClassLength", // yup, I have a lot of tests
50+
"PMD.TestClassWithoutTestCases"
5051
})
5152
class JsonUrlIteratorTest {
5253

@@ -235,7 +236,10 @@ private void testEvents(EventTest test, JsonUrlIterator jui)
235236

236237
@ParameterizedTest
237238
@MethodSource
238-
@SuppressWarnings("checkstyle:AbbreviationAsWordInName")
239+
@SuppressWarnings({
240+
"checkstyle:AbbreviationAsWordInName",
241+
"PMD.JUnitTestsShouldIncludeAssert"
242+
})
239243
void testAQF(EventTest test) throws IOException {
240244
CharIterator text = new JsonUrlCharSequence(
241245
"testAQF",
@@ -430,7 +434,10 @@ static Stream<EventTest> testAQF() {
430434

431435
@ParameterizedTest
432436
@MethodSource
433-
@SuppressWarnings("checkstyle:AbbreviationAsWordInName")
437+
@SuppressWarnings({
438+
"checkstyle:AbbreviationAsWordInName",
439+
"PMD.JUnitTestsShouldIncludeAssert"
440+
})
434441
void testNotAQF(EventTest test) throws IOException {
435442
CharIterator text = new JsonUrlCharSequence(
436443
"testNotAqf",

module/jsonurl-core/src/test/java/org/jsonurl/text/JsonUrlStringBuilderTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ void testException() {
602602
"f", "fa", "fal", "fals", "False", "fAlse", "faLse", "falSe", "falsE",
603603
"n", "nu", "nul", "Null", "nUll", "nuLl", "nulL",
604604
})
605+
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
605606
void testNonQuotedString(String text) throws IOException {
606607
testValue(text, text, text, text, text, text);
607608
}
@@ -610,6 +611,7 @@ void testNonQuotedString(String text) throws IOException {
610611
@ValueSource(strings = {
611612
"true", "false", "null", "1", "1.0", "1e3", "1e-3",
612613
})
614+
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
613615
void testQuotedString(String text) throws IOException {
614616
testValue(text, text, '\'' + text + '\'', text, '!' + text, text);
615617
}
@@ -634,6 +636,7 @@ void testQuotedString(String text) throws IOException {
634636
//
635637
"1e+3,1e%2B3,1e%2B3,1e!+3,1e!+3",
636638
})
639+
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
637640
void testEncodedString(
638641
String text,
639642
String expected,

module/jsonurl-core/src/test/java/org/jsonurl/text/NumberBuilderTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ void testOverflowUnderLimit(String text) {
418418
@ValueSource(strings = {
419419
Long.MAX_VALUE + "0",
420420
})
421+
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
421422
void testOverflow(String text) {
422423
testOverflow(
423424
text,

module/jsonurl-factory/src/test/java/org/jsonurl/factory/AbstractParseTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,7 @@ void testBigInteger(String text, MathContext mctx)
10051005
BIG_INTEGER128_BOUNDARY_POS + '0',
10061006
'-' + BIG_INTEGER128_BOUNDARY_NEG + '0',
10071007
})
1008+
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
10081009
void testBigInteger(String text) throws IOException {
10091010
if (!(factory instanceof BigMathProvider)) {
10101011
return;

module/jsonurl-jsonorg/src/test/java/org/jsonurl/jsonorg/JsonOrgApiWriteTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* @author David MacCormack
3232
* @since 2019-09-01
3333
*/
34+
@SuppressWarnings("PMD.TestClassWithoutTestCases")
3435
public class JsonOrgApiWriteTest extends AbstractJsonApiWriteTest<
3536
Object,
3637
Object,

module/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
<checkstyle.config.file>config/checkstyle.xml</checkstyle.config.file>
9090
<checkstyle.config.module.location>../../${checkstyle.config.file}</checkstyle.config.module.location>
91-
<pmd.version>6.43.0</pmd.version>
91+
<pmd.version>6.55.0</pmd.version>
9292
<pmd.config.file>config/pmd-ruleset.xml</pmd.config.file>
9393
<pmd.config.module.location>../../${pmd.config.file}</pmd.config.module.location>
9494
<jacoco.minimum.coverage>0.80</jacoco.minimum.coverage>

0 commit comments

Comments
 (0)