Upgrade to spring-javaformat 0.0.6
This commit is contained in:
@@ -152,7 +152,7 @@ public class SpringBootPluginExtension {
|
||||
* @return the Layout to use or null if not explicitly set
|
||||
*/
|
||||
public Layout convertLayout() {
|
||||
return (this.layout != null ? this.layout.layout : null);
|
||||
return (this.layout != null) ? this.layout.layout : null;
|
||||
}
|
||||
|
||||
public String getMainClass() {
|
||||
|
||||
@@ -114,8 +114,8 @@ class ProjectLibraries implements Libraries {
|
||||
|
||||
private Set<GradleLibrary> getLibraries(String configurationName,
|
||||
LibraryScope scope) {
|
||||
Configuration configuration = (configurationName != null
|
||||
? this.project.getConfigurations().findByName(configurationName) : null);
|
||||
Configuration configuration = (configurationName != null)
|
||||
? this.project.getConfigurations().findByName(configurationName) : null;
|
||||
if (configuration == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -233,11 +233,6 @@ class ProjectLibraries implements Libraries {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getFile().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof GradleLibrary) {
|
||||
@@ -246,6 +241,11 @@ class ProjectLibraries implements Libraries {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getFile().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getFile().getAbsolutePath();
|
||||
@@ -321,7 +321,7 @@ class ProjectLibraries implements Libraries {
|
||||
String configurationName = (String) this.getTargetConfiguration
|
||||
.invoke(projectDependency);
|
||||
return projectDependency.getDependencyProject().getConfigurations()
|
||||
.getByName(configurationName != null ? configurationName
|
||||
.getByName((configurationName != null) ? configurationName
|
||||
: Dependency.DEFAULT_CONFIGURATION);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
|
||||
@@ -145,7 +145,7 @@ public class RepackageTask extends DefaultTask {
|
||||
SpringBootPluginExtension extension = project.getExtensions()
|
||||
.getByType(SpringBootPluginExtension.class);
|
||||
ProjectLibraries libraries = new ProjectLibraries(project, extension,
|
||||
this.excludeDevtools != null ? this.excludeDevtools
|
||||
(this.excludeDevtools != null) ? this.excludeDevtools
|
||||
: extension.isExcludeDevtools());
|
||||
if (extension.getProvidedConfiguration() != null) {
|
||||
libraries.setProvidedConfigurationName(extension.getProvidedConfiguration());
|
||||
@@ -293,20 +293,20 @@ public class RepackageTask extends DefaultTask {
|
||||
}
|
||||
|
||||
private boolean isExecutable() {
|
||||
return (RepackageTask.this.executable != null ? RepackageTask.this.executable
|
||||
: this.extension.isExecutable());
|
||||
return (RepackageTask.this.executable != null) ? RepackageTask.this.executable
|
||||
: this.extension.isExecutable();
|
||||
}
|
||||
|
||||
private File getEmbeddedLaunchScript() {
|
||||
return (RepackageTask.this.embeddedLaunchScript != null
|
||||
return (RepackageTask.this.embeddedLaunchScript != null)
|
||||
? RepackageTask.this.embeddedLaunchScript
|
||||
: this.extension.getEmbeddedLaunchScript());
|
||||
: this.extension.getEmbeddedLaunchScript();
|
||||
}
|
||||
|
||||
private Map<String, String> getEmbeddedLaunchScriptProperties() {
|
||||
return (RepackageTask.this.embeddedLaunchScriptProperties != null
|
||||
return (RepackageTask.this.embeddedLaunchScriptProperties != null)
|
||||
? RepackageTask.this.embeddedLaunchScriptProperties
|
||||
: this.extension.getEmbeddedLaunchScriptProperties());
|
||||
: this.extension.getEmbeddedLaunchScriptProperties();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ public class BootRunTask extends JavaExec {
|
||||
private void addResourcesIfNecessary() {
|
||||
if (this.addResources) {
|
||||
SourceSet mainSourceSet = SourceSets.findMainSourceSet(getProject());
|
||||
final File outputDir = (mainSourceSet != null
|
||||
? mainSourceSet.getOutput().getResourcesDir() : null);
|
||||
final File outputDir = (mainSourceSet != null)
|
||||
? mainSourceSet.getOutput().getResourcesDir() : null;
|
||||
final Set<File> resources = new LinkedHashSet<File>();
|
||||
if (mainSourceSet != null) {
|
||||
resources.addAll(mainSourceSet.getResources().getSrcDirs());
|
||||
|
||||
Reference in New Issue
Block a user