From 5b243417ad32ca6b2efe0a809a12b18ffcaae06b Mon Sep 17 00:00:00 2001 From: thijsrijpert Date: Fri, 23 Aug 2024 10:32:44 +0200 Subject: [PATCH] [MCOMPILER-592] - IndexOutOfBoundsException when project.build.outputTimestamp is empty (#244) --- .../apache/maven/plugin/compiler/AbstractCompilerMojo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java index 77403e1e..f44bd81d 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java @@ -1152,7 +1152,9 @@ public void execute() { } } - if (outputTimestamp != null && (outputTimestamp.length() > 1 || Character.isDigit(outputTimestamp.charAt(0)))) { + if (outputTimestamp != null + && !outputTimestamp.isEmpty() + && (outputTimestamp.length() > 1 || Character.isDigit(outputTimestamp.charAt(0)))) { // if Reproducible Builds mode, apply workaround patchJdkModuleVersion(compilerResult, sources); }