Skip to content

Commit 4b670f8

Browse files
committed
Merge pull request #20419 from wycm
* pr/20419: Polish Closes gh-20419
2 parents 278f769 + 916a474 commit 4b670f8

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ServiceCapabilitiesReportGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -99,7 +99,7 @@ private List<Dependency> getSortedDependencies(InitializrServiceMetadata metadat
9999
private void reportAvailableProjectTypes(InitializrServiceMetadata metadata, StringBuilder report) {
100100
report.append("Available project types:").append(NEW_LINE);
101101
report.append("------------------------").append(NEW_LINE);
102-
SortedSet<Entry<String, ProjectType>> entries = new TreeSet<>(Comparator.comparing(Entry::getKey));
102+
SortedSet<Entry<String, ProjectType>> entries = new TreeSet<>(Entry.comparingByKey());
103103
entries.addAll(metadata.getProjectTypes().entrySet());
104104
for (Entry<String, ProjectType> entry : entries) {
105105
ProjectType type = entry.getValue();

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/EscapeAwareWhiteSpaceArgumentDelimiter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ private String replaceEscapes(String string) {
9595
string = string.replace("\\\\", "\\");
9696
string = string.replace("\\t", "\t");
9797
string = string.replace("\\\"", "\"");
98-
string = string.replace("\\\'", "\'");
98+
string = string.replace("\\'", "'");
9999
return string;
100100
}
101101

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -221,7 +221,7 @@ protected void afterRun(Command command) {
221221

222222
boolean handleSigInt() {
223223
Command command = this.lastCommand;
224-
if (command != null && command instanceof RunProcessCommand) {
224+
if (command instanceof RunProcessCommand) {
225225
return ((RunProcessCommand) command).handleSigInt();
226226
}
227227
return false;

spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/client/RemoteClientConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
1919
import java.net.InetSocketAddress;
2020
import java.net.Proxy.Type;
2121
import java.net.URL;
22-
import java.util.Arrays;
22+
import java.util.Collections;
2323
import java.util.List;
2424
import java.util.concurrent.ExecutorService;
2525
import java.util.concurrent.Executors;
@@ -90,7 +90,7 @@ public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderCon
9090

9191
@Bean
9292
public ClientHttpRequestFactory clientHttpRequestFactory() {
93-
List<ClientHttpRequestInterceptor> interceptors = Arrays.asList(getSecurityInterceptor());
93+
List<ClientHttpRequestInterceptor> interceptors = Collections.singletonList(getSecurityInterceptor());
9494
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
9595
Proxy proxy = this.properties.getRemote().getProxy();
9696
if (proxy.getHost() != null && proxy.getPort() != null) {

0 commit comments

Comments
 (0)