Skip to content

Commit 3485401

Browse files
committed
Add PMD check to default Maven goal
1 parent ea754bc commit 3485401

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<commons.jacoco.complexityRatio>0.94</commons.jacoco.complexityRatio>
9595
</properties>
9696
<build>
97-
<defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check spotbugs:check javadoc:javadoc</defaultGoal>
97+
<defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check spotbugs:check pmd:check javadoc:javadoc</defaultGoal>
9898
<pluginManagement>
9999
<plugins>
100100
<plugin>

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<release version="1.8.0" date="YYYY-MM-DD" description="This release contains new features and bug fixes and requires Java 8 or above.">
2626
<!-- ADD -->
2727
<action type="add" issue="CLI-332" dev="ggregory" due-to="Claude Warren, Gary Gregory">Add optional HelpFormatter Function to document Deprecated options #271.</action>
28+
<action type="add" dev="ggregory" due-to="Gary Gregory">Add PMD check to default Maven goal.</action>
2829
<!-- FIX -->
2930
<action type="fix" issue="CLI-331" dev="ggregory" due-to="Claude Warren, Gary Gregory">Handle reporting of deprecated options when parameters are not String type. #270.</action>
3031
<action type="fix" dev="ggregory" due-to="Claude Warren, Gary Gregory">Avoid throwing NullPointerException when calling CommandLineParser will null array elements.</action>

src/main/java/org/apache/commons/cli/CommandLine.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Licensed to the Apache Software Foundation (ASF) under one or more
1717

1818
package org.apache.commons.cli;
1919

20-
import static org.apache.commons.cli.Util.EMPTY_STRING_ARRAY;
21-
2220
import java.io.Serializable;
2321
import java.util.ArrayList;
2422
import java.util.Iterator;
@@ -414,7 +412,7 @@ public String[] getOptionValues(final Option option) {
414412
values.addAll(processedOption.getValuesList());
415413
}
416414
}
417-
return values.isEmpty() ? null : values.toArray(EMPTY_STRING_ARRAY);
415+
return values.isEmpty() ? null : values.toArray(Util.EMPTY_STRING_ARRAY);
418416
}
419417

420418
/**

0 commit comments

Comments
 (0)