diff --git a/src/main/java/de/dentrassi/rpm/builder/PackageEntry.java b/src/main/java/de/dentrassi/rpm/builder/PackageEntry.java index 6df43fd..f4c2231 100644 --- a/src/main/java/de/dentrassi/rpm/builder/PackageEntry.java +++ b/src/main/java/de/dentrassi/rpm/builder/PackageEntry.java @@ -11,6 +11,7 @@ package de.dentrassi.rpm.builder; import java.io.File; +import java.util.Arrays; public class PackageEntry extends EntryDetails { public static class Collector { @@ -66,7 +67,7 @@ public String[] getExcludes() { @Override public String toString() { - return String.format("[collector - from: %s, directories: %s, symLinks: %s, includes: %s, excludes: %s]", this.from, this.directories, this.symbolicLinks, this.includes, this.excludes); + return String.format("[collector - from: %s, directories: %s, symLinks: %s, includes: %s, excludes: %s]", this.from, this.directories, this.symbolicLinks, Arrays.toString(this.includes), Arrays.toString(this.excludes)); } } diff --git a/src/main/java/de/dentrassi/rpm/builder/RpmMojo.java b/src/main/java/de/dentrassi/rpm/builder/RpmMojo.java index 2b87c5b..6ec0dff 100644 --- a/src/main/java/de/dentrassi/rpm/builder/RpmMojo.java +++ b/src/main/java/de/dentrassi/rpm/builder/RpmMojo.java @@ -813,7 +813,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { } catch (final FileAlreadyExistsException e) { // silently ignore } catch (final IOException ioe) { - this.logger.debug("Unable to create target directory {}", targetDir); + this.logger.debug("Unable to create target directory %s", targetDir); throw new MojoExecutionException("RPM build failed.", ioe); } @@ -1108,7 +1108,7 @@ protected void fillPayload(final RpmBuilder builder) throws MojoFailureException if (this.generateIntermediateDirectories.isEmpty()) { ctx = builder.newContext(); } else { - ctx = new MissingDirectoryGeneratorInterceptor(builder.newContext(), this.generateIntermediateDirectories);; + ctx = new MissingDirectoryGeneratorInterceptor(builder.newContext(), this.generateIntermediateDirectories); } this.logger.debug("Building payload:"); @@ -1130,12 +1130,12 @@ private void customizeHeader(final RpmBuilder builder) { builder.setHeaderCustomizer(rpmTagHeader -> { if (this.prefixes != null && !this.prefixes.isEmpty()) { - this.logger.debug("Building relocatable package: {}", this.prefixes); + this.logger.debug("Building relocatable package: %s", this.prefixes); rpmTagHeader.putStringArray(RpmTag.PREFIXES, this.prefixes.toArray(new String[0])); } if (outputTimestampInstant != null) { - this.logger.debug("Overriding build time: {}", outputTimestampInstant); + this.logger.debug("Overriding build time: %s", outputTimestampInstant); rpmTagHeader.putInt(RpmTag.BUILDTIME, (int) (outputTimestampInstant.toEpochMilli() / 1000)); } }); diff --git a/src/main/java/de/dentrassi/rpm/builder/RulesetEvaluator.java b/src/main/java/de/dentrassi/rpm/builder/RulesetEvaluator.java index cae97aa..76b5120 100644 --- a/src/main/java/de/dentrassi/rpm/builder/RulesetEvaluator.java +++ b/src/main/java/de/dentrassi/rpm/builder/RulesetEvaluator.java @@ -16,7 +16,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.eclipse.packager.rpm.build.FileInformation; import org.eclipse.packager.rpm.build.PayloadEntryType; @@ -41,7 +40,7 @@ public RulesetInstance(final String id, final List rules, final String par private void eval(final Object object, final PayloadEntryType type, final String targetName, final FileInformation info, final Set knownSets) { if (knownSets.contains(this.id)) { - throw new IllegalStateException(String.format("Recursive calling of rulesets is not allowed- current: %s, previous: %s", this.id, knownSets.stream().collect(Collectors.joining(", ")))); + throw new IllegalStateException(String.format("Recursive calling of rulesets is not allowed- current: %s, previous: %s", this.id, String.join(", ", knownSets))); } knownSets.add(this.id);