Skip to content

Commit

Permalink
Avoid NPE in CodeGenerator.dumpCurrentConfigValues
Browse files Browse the repository at this point in the history
When we don't have any previous recorded config properties, we should
push an empty Properties. At least, that's what
CodeGenerator.dumpCurrentConfigValues expects.
  • Loading branch information
gsmet committed Feb 1, 2024
1 parent 6a0c3c6 commit 147f181
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ protected void doExecute() throws MojoExecutionException, MojoFailureException {
curatedApplication = bootstrapApplication(launchMode);
if (prevConfigExists || dumpCurrentWhenRecordedUnavailable) {
final Path targetFile = getOutputFile(outputFile, launchMode.getDefaultProfile(), "-config-check");
Properties compareProps = null;
Properties compareProps = new Properties();
if (prevConfigExists) {
compareProps = new Properties();
try (BufferedReader reader = Files.newBufferedReader(compareFile)) {
compareProps.load(reader);
} catch (IOException e) {
Expand Down

0 comments on commit 147f181

Please sign in to comment.