Merge branch '2.7.x'

This commit is contained in:
Andy Wilkinson
2022-05-26 18:22:27 +01:00
35 changed files with 99 additions and 286 deletions

View File

@@ -451,11 +451,6 @@ public class DockerApi {
}
}
String getCapturedDigest() {
Assert.hasText(this.digest, "No digest found");
return this.digest;
}
}
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,7 +59,8 @@ public class InspectedContent implements Content {
FileCopyUtils.copy((byte[]) this.content, outputStream);
}
else if (this.content instanceof File) {
FileCopyUtils.copy(new FileInputStream((File) this.content), outputStream);
InputStream inputStream = new FileInputStream((File) this.content);
FileCopyUtils.copy(inputStream, outputStream);
}
else {
throw new IllegalStateException("Unknown content type");

View File

@@ -163,7 +163,6 @@ final class JavaPluginAction implements PluginApplicationAction {
});
}
@SuppressWarnings("deprecation")
private void configureArtifactPublication(TaskProvider<BootJar> bootJar) {
this.singlePublishedArtifact.addJarCandidate(bootJar);
}

View File

@@ -105,7 +105,6 @@ class WarPluginAction implements PluginApplicationAction {
.configure((buildImage) -> buildImage.getArchiveFile().set(bootWar.get().getArchiveFile()));
}
@SuppressWarnings("deprecation")
private void configureArtifactPublication(TaskProvider<BootWar> bootWar) {
this.singlePublishedArtifact.addWarCandidate(bootWar);
}

View File

@@ -101,7 +101,7 @@ public class Repackager extends Packager {
public void repackage(File destination, Libraries libraries, LaunchScript launchScript, FileTime lastModifiedTime)
throws IOException {
Assert.isTrue(destination != null && !destination.isDirectory(), "Invalid destination");
Layout layout = getLayout(); // get layout early
getLayout(); // get layout early
destination = destination.getAbsoluteFile();
File source = getSource();
if (isAlreadyPackaged() && source.equals(destination)) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import sun.misc.Signal;
* @author Dave Syer
* @since 1.1.0
*/
@SuppressWarnings("restriction")
public final class SignalUtils {
private static final Signal SIG_INT = new Signal("INT");