diff --git a/src/main/java/org/apache/maven/archiver/MavenArchiver.java b/src/main/java/org/apache/maven/archiver/MavenArchiver.java index aa9a1b0..232decc 100644 --- a/src/main/java/org/apache/maven/archiver/MavenArchiver.java +++ b/src/main/java/org/apache/maven/archiver/MavenArchiver.java @@ -223,7 +223,7 @@ private void addManifestAttribute(Manifest manifest, Map map, St } private void addManifestAttribute(Manifest manifest, String key, String value) throws ManifestException { - if (!StringUtils.isEmpty(value)) { + if (!(value == null || value.isEmpty())) { Manifest.Attribute attr = new Manifest.Attribute(key, value); manifest.addConfiguredAttribute(attr); } else { @@ -772,7 +772,7 @@ public static Optional parseBuildOutputTimestamp(String outputTimestamp } // Number representing seconds since the epoch - if (StringUtils.isNotEmpty(outputTimestamp) && StringUtils.isNumeric(outputTimestamp)) { + if ((outputTimestamp != null && !outputTimestamp.isEmpty()) && StringUtils.isNumeric(outputTimestamp)) { return Optional.of(Instant.ofEpochSecond(Long.parseLong(outputTimestamp))); }