diff --git a/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/CpdCommand.java b/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/CpdCommand.java index 90d5dfc2b1..6c1a8acc7a 100644 --- a/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/CpdCommand.java +++ b/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/CpdCommand.java @@ -155,7 +155,7 @@ public class CpdCommand extends AbstractAnalysisPmdSubcommand { /** * Provider of candidates for valid report formats. */ - private static class CpdSupportedReportFormatsCandidates implements Iterable { + private final static class CpdSupportedReportFormatsCandidates implements Iterable { @Override public Iterator iterator() { diff --git a/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/PmdCommand.java b/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/PmdCommand.java index 7cf8a36dd0..94d6d3507b 100644 --- a/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/PmdCommand.java +++ b/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/PmdCommand.java @@ -53,7 +53,7 @@ public class PmdCommand extends AbstractAnalysisPmdSubcommand { for (final String rendererName : RendererFactory.supportedRenderers()) { final Renderer renderer = RendererFactory.createRenderer(rendererName, emptyProps); - if (renderer.getPropertyDescriptors().size() > 0) { + if (!renderer.getPropertyDescriptors().isEmpty()) { reportPropertiesHelp.append(rendererName + ":" + System.getProperty("line.separator")); for (final PropertyDescriptor property : renderer.getPropertyDescriptors()) { reportPropertiesHelp.append(" ").append(property.name()).append(" - ") @@ -374,7 +374,7 @@ public class PmdCommand extends AbstractAnalysisPmdSubcommand { /** * Provider of candidates for valid report formats. */ - private static class PmdSupportedReportFormatsCandidates implements Iterable { + private final static class PmdSupportedReportFormatsCandidates implements Iterable { @Override public Iterator iterator() { @@ -387,7 +387,7 @@ public class PmdCommand extends AbstractAnalysisPmdSubcommand { * * Check the help for which ones are supported by each report format and possible values. */ - private static class PmdReportPropertiesCandidates implements Iterable { + private final static class PmdReportPropertiesCandidates implements Iterable { @Override public Iterator iterator() { diff --git a/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/TreeExportCommand.java b/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/TreeExportCommand.java index c61b6ef35b..f3aa2705ad 100644 --- a/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/TreeExportCommand.java +++ b/pmd-cli/src/main/java/net/sourceforge/pmd/cli/commands/internal/TreeExportCommand.java @@ -40,7 +40,7 @@ public class TreeExportCommand extends AbstractPmdSubcommand { for (final TreeRendererDescriptor renderer : TreeRenderers.registeredRenderers()) { final PropertySource propertyBundle = renderer.newPropertyBundle(); - if (propertyBundle.getPropertyDescriptors().size() > 0) { + if (!propertyBundle.getPropertyDescriptors().isEmpty()) { reportPropertiesHelp.append(renderer.id() + ":" + System.getProperty("line.separator")); for (final PropertyDescriptor property : propertyBundle.getPropertyDescriptors()) { reportPropertiesHelp.append(" ").append(property.name()).append(" - ") @@ -121,7 +121,7 @@ public class TreeExportCommand extends AbstractPmdSubcommand { /** * Provides completion candidates for the report format. */ - private static class TreeRenderersCandidates implements Iterable { + private final static class TreeRenderersCandidates implements Iterable { @Override public Iterator iterator() { @@ -134,7 +134,7 @@ public class TreeExportCommand extends AbstractPmdSubcommand { * * Check the help for which ones are supported by each report format and possible values. */ - private static class TreeExportReportPropertiesCandidates implements Iterable { + private final static class TreeExportReportPropertiesCandidates implements Iterable { @Override public Iterator iterator() {