From ace8f8a52e5e782a341902103c927e4a6d4ae8d9 Mon Sep 17 00:00:00 2001 From: Arun Venmany Date: Fri, 17 Jan 2025 10:03:27 +0530 Subject: [PATCH] lastBuildFileChange adding some null checks Signed-off-by: Arun Venmany --- .../io/openliberty/tools/common/plugins/util/DevUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java index 0ff8648d..0ca1b6ee 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java +++ b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java @@ -3627,7 +3627,7 @@ private boolean processUpstreamJavaCompilation(List upstreamProje boolean compileDownstreamSrc = false; boolean compileDownstreamTest = false; - boolean pastBuildFileWaitPeriod = System + boolean pastBuildFileWaitPeriod = lastBuildFileChange.get(project.getBuildFile()) != null && System .currentTimeMillis() > lastBuildFileChange.get(project.getBuildFile()) + compileWaitMillis; if (!pastBuildFileWaitPeriod) { continue; @@ -3885,7 +3885,7 @@ private void processJavaCompilation(File outputDirectory, File testOutputDirecto // process java source files if no changes detected after the compile wait time boolean processSources = System.currentTimeMillis() > lastJavaSourceChange + compileWaitMillis; boolean processTests = System.currentTimeMillis() > lastJavaTestChange + compileWaitMillis; - boolean pastBuildFileWaitPeriod = System.currentTimeMillis() > lastBuildFileChange.get(buildFile) + compileWaitMillis; + boolean pastBuildFileWaitPeriod = lastBuildFileChange.get(buildFile) != null && System.currentTimeMillis() > lastBuildFileChange.get(buildFile) + compileWaitMillis; if (processSources && pastBuildFileWaitPeriod) { // Count the messages before the compile. int numApplicationUpdatedMessages = 0;