Skip to content
Closed

Polish #19995

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private static String getPathInfo(HttpServletRequest request) {
}

/**
* Creates a {@code exception} tag based on the {@link Class#getSimpleName() simple
* Creates an {@code exception} tag based on the {@link Class#getSimpleName() simple
* name} of the class of the given {@code exception}.
* @param exception the exception, may be {@code null}
* @return the exception tag derived from the exception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ProjectGenerationRequest {

private String bootVersion;

private List<String> dependencies = new ArrayList<>();
private final List<String> dependencies = new ArrayList<>();

/**
* The URL of the service to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class BootJar extends Jar implements BootArchive {

private static final String BOOT_INF_LAYERS = "BOOT-INF/layers";

private List<String> dependencies = new ArrayList<>();
private final List<String> dependencies = new ArrayList<>();

/**
* Creates a new {@code BootJar} task.
Expand Down Expand Up @@ -111,22 +111,11 @@ public void copy() {
}

private File createClasspathIndex(List<String> dependencies) {
try {
StringWriter content = new StringWriter();
BufferedWriter writer = new BufferedWriter(content);
for (String dependency : dependencies) {
writer.write(dependency);
writer.write("\n");
}
writer.flush();
File source = getProject().getResources().getText().fromString(content.toString()).asFile();
File indexFile = new File(source.getParentFile(), "classpath.idx");
source.renameTo(indexFile);
return indexFile;
}
catch (IOException ex) {
throw new RuntimeException("Failed to create classpath.idx", ex);
}
String content = dependencies.stream().collect(Collectors.joining("\n", "", "\n"));
File source = getProject().getResources().getText().fromString(content).asFile();
File indexFile = new File(source.getParentFile(), "classpath.idx");
source.renameTo(indexFile);
return indexFile;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,6 @@ void loaderIsWrittenFirstThenApplicationClassesThenLibraries() throws IOExceptio
this.libPath + "third-library.jar");
}

@Test
void libEntriesAreStored() throws IOException {

}

protected File jarFile(String name) throws IOException {
File file = newFile(name);
try (JarOutputStream jar = new JarOutputStream(new FileOutputStream(file))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ protected RunArguments resolveApplicationArguments() {
/**
* Provides access to the java binary executable, regardless of OS.
* @return the java executable
**/
*/
protected String getJavaExecutable() {
Toolchain toolchain = this.toolchainManager.getToolchainFromBuildContext("jdk", this.session);
String javaExecutable = (toolchain != null) ? toolchain.findTool("java") : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public WebServiceTemplateBuilder setCheckConnectionForError(boolean checkConnect
* @param messageFactory the message factory to use for creating messages
* @return a new builder instance.
* @see WebServiceTemplate#setMessageFactory(WebServiceMessageFactory)
**/
*/
public WebServiceTemplateBuilder setWebServiceMessageFactory(WebServiceMessageFactory messageFactory) {
Assert.notNull(messageFactory, "MessageFactory must not be null");
return new WebServiceTemplateBuilder(this.detectHttpMessageSender, this.interceptors, this.internalCustomizers,
Expand All @@ -342,7 +342,7 @@ public WebServiceTemplateBuilder setWebServiceMessageFactory(WebServiceMessageFa
* @param unmarshaller the message unmarshaller
* @return a new builder instance.
* @see WebServiceTemplate#setUnmarshaller(Unmarshaller)
**/
*/
public WebServiceTemplateBuilder setUnmarshaller(Unmarshaller unmarshaller) {
return new WebServiceTemplateBuilder(this.detectHttpMessageSender, this.interceptors, this.internalCustomizers,
this.customizers, this.messageSenders, this.marshaller, unmarshaller, this.destinationProvider,
Expand All @@ -354,7 +354,7 @@ public WebServiceTemplateBuilder setUnmarshaller(Unmarshaller unmarshaller) {
* @param marshaller the message marshaller
* @return a new builder instance.
* @see WebServiceTemplate#setMarshaller(Marshaller)
**/
*/
public WebServiceTemplateBuilder setMarshaller(Marshaller marshaller) {
return new WebServiceTemplateBuilder(this.detectHttpMessageSender, this.interceptors, this.internalCustomizers,
this.customizers, this.messageSenders, marshaller, this.unmarshaller, this.destinationProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*/
@ClassPathExclusions("hibernate-validator-*.jar")
@ClassPathOverrides("javax.validation:validation-api:2.0.1.Final")
class JavaxApiValidationExceptionFailureAnalyzerTests2 {
class JavaxApiValidationExceptionFailureAnalyzerTests {

@Test
void validatedPropertiesTest() {
Expand Down