Polish
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:
committed by
Stephane Nicoll
parent
c27fa7bf91
commit
98f4692c62
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user