This commit changes invocations to immediately return the expression
instead of assigning it to a temporary variable. The method name should
be sufficient for callers to know exactly what will be returned.

Closes gh-12211
This commit is contained in:
igor-suhorukov
2018-02-25 00:50:47 +03:00
committed by Stephane Nicoll
parent c27fa7bf91
commit 98f4692c62
11 changed files with 12 additions and 25 deletions

View File

@@ -64,8 +64,7 @@ public class SpringApplicationWebApplicationInitializer
private Manifest getManifest(ServletContext servletContext) throws IOException {
InputStream stream = servletContext.getResourceAsStream("/META-INF/MANIFEST.MF");
Manifest manifest = (stream == null ? null : new Manifest(stream));
return manifest;
return (stream == null ? null : new Manifest(stream));
}
@Override

View File

@@ -235,8 +235,7 @@ public class GroovyCompiler {
try {
Field field = CompilationUnit.class.getDeclaredField("phaseOperations");
field.setAccessible(true);
LinkedList[] phaseOperations = (LinkedList[]) field.get(compilationUnit);
return phaseOperations;
return (LinkedList[]) field.get(compilationUnit);
}
catch (Exception ex) {
throw new IllegalStateException(

View File

@@ -324,10 +324,9 @@ public class AetherGrapeEngine implements GrapeEngine {
}
private DependencyRequest getDependencyRequest(CollectRequest collectRequest) {
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest,
return new DependencyRequest(collectRequest,
DependencyFilterUtils.classpathFilter(JavaScopes.COMPILE,
JavaScopes.RUNTIME));
return dependencyRequest;
}
private void addManagedDependencies(DependencyResult result) {

View File

@@ -160,8 +160,7 @@ public abstract class ResourceUtils {
}
else {
if (location.startsWith(FILE_URL_PREFIX)) {
Resource resource = this.files.getResource(location);
return resource;
return this.files.getResource(location);
}
try {
// Try to parse the location as a URL...