4343 * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
4444 * @since 1.0
4545 */
46+ @ SuppressFBWarnings ("PATH_TRAVERSAL_IN" )
4647public class PmdOperation extends AbstractOperation <PmdOperation > {
4748 /**
4849 * The default logger.
@@ -56,12 +57,12 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
5657 public static final String RULE_SET_DEFAULT = "rulesets/java/quickstart.xml" ;
5758
5859 private static final String PMD_DIR = "pmd" ;
59- private final Collection <Path > excludes_ = new ArrayList <>();
60- private final Collection <Path > inputPaths_ = new ArrayList <>();
61- private final Collection <LanguageVersion > languageVersions_ = new ArrayList <>();
62- private final Collection <Path > relativizeRoots_ = new ArrayList <>();
60+ private final List <Path > excludes_ = new ArrayList <>();
61+ private final List <Path > inputPaths_ = new ArrayList <>();
62+ private final List <LanguageVersion > languageVersions_ = new ArrayList <>();
63+ private final List <Path > relativizeRoots_ = new ArrayList <>();
6364 private final Properties reportProperties_ = new Properties ();
64- private final Collection <String > ruleSets_ = new ArrayList <>();
65+ private final List <String > ruleSets_ = new ArrayList <>();
6566 private Path cache_ ;
6667 private boolean collectFilesRecursively_ = true ;
6768 private Charset encoding_ = StandardCharsets .UTF_8 ;
@@ -393,7 +394,7 @@ public PmdOperation excludes(Collection<Path> excludes) {
393394 * @return the exclude paths
394395 */
395396 @ SuppressFBWarnings ("EI_EXPOSE_REP" )
396- public Collection <Path > excludes () {
397+ public List <Path > excludes () {
397398 return excludes_ ;
398399 }
399400
@@ -729,7 +730,7 @@ public PmdOperation inputPaths(Collection<Path> inputPath) {
729730 * @return the input paths
730731 */
731732 @ SuppressFBWarnings ("EI_EXPOSE_REP" )
732- public Collection <Path > inputPaths () {
733+ public List <Path > inputPaths () {
733734 return inputPaths_ ;
734735 }
735736
@@ -787,7 +788,7 @@ public PmdOperation languageVersions(Collection<LanguageVersion> languageVersion
787788 * @return the language versions
788789 */
789790 @ SuppressFBWarnings ("EI_EXPOSE_REP" )
790- public Collection <LanguageVersion > languageVersions () {
791+ public List <LanguageVersion > languageVersions () {
791792 return languageVersions_ ;
792793 }
793794
@@ -947,7 +948,7 @@ public PmdOperation relativizeRoots(Collection<Path> relativeRoot) {
947948 * @return the relative root paths
948949 */
949950 @ SuppressFBWarnings ("EI_EXPOSE_REP" )
950- public Collection <Path > relativizeRoots () {
951+ public List <Path > relativizeRoots () {
951952 return relativizeRoots_ ;
952953 }
953954
@@ -1000,6 +1001,7 @@ public PmdOperation reportFile(File reportFile) {
10001001 * @param reportFile the report file path
10011002 * @return this operation
10021003 */
1004+ @ SuppressFBWarnings ("PATH_TRAVERSAL_IN" )
10031005 public PmdOperation reportFile (String reportFile ) {
10041006 return reportFile (Paths .get (reportFile ));
10051007 }
@@ -1092,7 +1094,7 @@ public PmdOperation ruleSets(Collection<String> ruleSet) {
10921094 * @return the rule sets
10931095 */
10941096 @ SuppressFBWarnings ("EI_EXPOSE_REP" )
1095- public Collection <String > ruleSets () {
1097+ public List <String > ruleSets () {
10961098 return ruleSets_ ;
10971099 }
10981100
0 commit comments