Upgrade to spring-javaformat 0.0.6

This commit is contained in:
Phillip Webb
2018-08-28 15:22:36 -07:00
parent 17de1571f5
commit 9543fcf44d
290 changed files with 1021 additions and 1014 deletions

View File

@@ -358,10 +358,11 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
private void addClasspath(List<String> args) throws MojoExecutionException {
try {
StringBuilder classpath = new StringBuilder();
for (URL ele : getClassPathUrls()) {
classpath = classpath
.append((classpath.length() > 0 ? File.pathSeparator : "")
+ new File(ele.toURI()));
for (URL url : getClassPathUrls()) {
if (classpath.length() > 0) {
classpath.append(File.pathSeparator);
}
classpath.append(new File(url.toURI()));
}
getLog().debug("Classpath for forked process: " + classpath);
args.add("-cp");
@@ -481,7 +482,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
public void uncaughtException(Thread thread, Throwable ex) {
if (!(ex instanceof ThreadDeath)) {
synchronized (this.monitor) {
this.exception = (this.exception != null ? this.exception : ex);
this.exception = (this.exception != null) ? this.exception : ex;
}
getLog().warn(ex);
}
@@ -511,7 +512,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
LaunchRunner(String startClassName, String... args) {
this.startClassName = startClassName;
this.args = (args != null ? args : new String[] {});
this.args = (args != null) ? args : new String[] {};
}
@Override

View File

@@ -69,7 +69,7 @@ public class PropertiesMergingResourceTransformer implements ResourceTransformer
String value = (String) entry.getValue();
String existing = this.data.getProperty(name);
this.data.setProperty(name,
existing != null ? existing + "," + value : value);
(existing != null) ? existing + "," + value : value);
}
}

View File

@@ -223,7 +223,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
}
private File getTargetFile() {
String classifier = (this.classifier != null ? this.classifier.trim() : "");
String classifier = (this.classifier != null) ? this.classifier.trim() : "";
if (classifier.length() > 0 && !classifier.startsWith("-")) {
classifier = "-" + classifier;
}
@@ -288,7 +288,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
}
private String removeLineBreaks(String description) {
return (description != null ? description.replaceAll("\\s+", " ") : null);
return (description != null) ? description.replaceAll("\\s+", " ") : null;
}
private void putIfMissing(Properties properties, String key,