Commit 2f73e196 authored by Kant Leung's avatar Kant Leung Committed by Andy Wilkinson

Polish

See gh-18534
parent 897ef4d2
...@@ -46,7 +46,7 @@ public class HintCommand extends AbstractCommand { ...@@ -46,7 +46,7 @@ public class HintCommand extends AbstractCommand {
@Override @Override
public ExitStatus run(String... args) throws Exception { public ExitStatus run(String... args) throws Exception {
try { try {
int index = (args.length != 0) ? Integer.valueOf(args[0]) - 1 : 0; int index = (args.length != 0) ? Integer.parseInt(args[0]) - 1 : 0;
List<String> arguments = new ArrayList<>(args.length); List<String> arguments = new ArrayList<>(args.length);
for (int i = 2; i < args.length; i++) { for (int i = 2; i < args.length; i++) {
arguments.add(args[i]); arguments.add(args[i]);
......
...@@ -103,7 +103,7 @@ class Installer { ...@@ -103,7 +103,7 @@ class Installer {
if (countString == null) { if (countString == null) {
return 0; return 0;
} }
return Integer.valueOf(countString); return Integer.parseInt(countString);
} }
private void setInstallCount(File file, int count) { private void setInstallCount(File file, int count) {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.cli.compiler.grape; package org.springframework.boot.cli.compiler.grape;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.eclipse.aether.repository.Proxy; import org.eclipse.aether.repository.Proxy;
...@@ -31,7 +30,7 @@ import org.eclipse.aether.repository.RemoteRepository; ...@@ -31,7 +30,7 @@ import org.eclipse.aether.repository.RemoteRepository;
*/ */
public class CompositeProxySelector implements ProxySelector { public class CompositeProxySelector implements ProxySelector {
private List<ProxySelector> selectors = new ArrayList<>(); private List<ProxySelector> selectors;
public CompositeProxySelector(List<ProxySelector> selectors) { public CompositeProxySelector(List<ProxySelector> selectors) {
this.selectors = selectors; this.selectors = selectors;
......
...@@ -198,7 +198,7 @@ final class ResolveDependencyCoordinatesTransformationTests { ...@@ -198,7 +198,7 @@ final class ResolveDependencyCoordinatesTransformationTests {
declarationExpression.addAnnotation(this.grabAnnotation); declarationExpression.addAnnotation(this.grabAnnotation);
BlockStatement code = new BlockStatement( BlockStatement code = new BlockStatement(
Arrays.asList((Statement) new ExpressionStatement(declarationExpression)), new VariableScope()); Arrays.asList(new ExpressionStatement(declarationExpression)), new VariableScope());
MethodNode methodNode = new MethodNode("test", 0, new ClassNode(Void.class), new Parameter[0], new ClassNode[0], MethodNode methodNode = new MethodNode("test", 0, new ClassNode(Void.class), new Parameter[0], new ClassNode[0],
code); code);
......
...@@ -123,7 +123,7 @@ public class HttpTunnelPayload { ...@@ -123,7 +123,7 @@ public class HttpTunnelPayload {
body.read(payload); body.read(payload);
} }
payload.flip(); payload.flip();
return new HttpTunnelPayload(Long.valueOf(seqHeader), payload); return new HttpTunnelPayload(Long.parseLong(seqHeader), payload);
} }
} }
......
...@@ -104,7 +104,7 @@ public class StopMojo extends AbstractMojo { ...@@ -104,7 +104,7 @@ public class StopMojo extends AbstractMojo {
return this.fork; return this.fork;
} }
String property = this.project.getProperties().getProperty("_spring.boot.fork.enabled"); String property = this.project.getProperties().getProperty("_spring.boot.fork.enabled");
return Boolean.valueOf(property); return Boolean.parseBoolean(property);
} }
private void stopForkedProcess() throws IOException, MojoFailureException, MojoExecutionException { private void stopForkedProcess() throws IOException, MojoFailureException, MojoExecutionException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment