From c54bd846b481a5e76a5b8f65931ba12ef12ff084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Tue, 18 Apr 2023 20:15:48 -0300 Subject: [PATCH] Fix #4484 - Avoid an NPE on properties. --- .../pmd/cli/commands/internal/TreeExportCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c034682f07..452d1410fd 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 @@ -75,7 +75,7 @@ public class TreeExportCommand extends AbstractPmdSubcommand { @Option(names = "-P", description = "Key-value pair defining a property for the report format.%n" + "Supported values for each report format:%n${sys:pmd-cli.tree-export.report.properties.help}", completionCandidates = TreeExportReportPropertiesCandidates.class) - private Properties properties; + private Properties properties = new Properties(); @Option(names = "--file", description = "The file to parse and dump.") private Path file;