Merge branch '2.6.x' into 2.7.x

This commit is contained in:
Andy Wilkinson
2022-05-26 18:13:08 +01:00
39 changed files with 112 additions and 154 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

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 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.
@@ -113,7 +113,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

@@ -248,7 +248,6 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
return this.workingDirectory != null;
}
@SuppressWarnings("deprecation")
private void run(String startClassName) throws MojoExecutionException, MojoFailureException {
boolean fork = isFork();
this.project.getProperties().setProperty("_spring.boot.fork.enabled", Boolean.toString(fork));

View File

@@ -82,7 +82,6 @@ public class StopMojo extends AbstractMojo {
private boolean skip;
@Override
@SuppressWarnings("deprecation")
public void execute() throws MojoExecutionException, MojoFailureException {
if (this.skip) {
getLog().debug("skipping stop as per configuration.");