Browse Source

polishing

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1167 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Juergen Hoeller 17 years ago
parent
commit
c072de6f75
  1. 10
      org.springframework.core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
  2. 9
      org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java

10
org.springframework.core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

@ -171,7 +171,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol @@ -171,7 +171,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
try {
Class fileLocatorClass = PathMatchingResourcePatternResolver.class.getClassLoader().loadClass(
"org.eclipse.core.runtime.FileLocator");
equinoxResolveMethod = fileLocatorClass.getMethod("resolve", new Class[] {URL.class});
equinoxResolveMethod = fileLocatorClass.getMethod("resolve", URL.class);
logger.debug("Found Equinox FileLocator for OSGi bundle URL resolution");
}
catch (Throwable ex) {
@ -420,9 +420,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol @@ -420,9 +420,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
throws IOException {
URLConnection con = rootDirResource.getURL().openConnection();
JarFile jarFile = null;
String jarFileUrl = null;
String rootEntryPath = null;
JarFile jarFile;
String jarFileUrl;
String rootEntryPath;
boolean newJarFile = false;
if (con instanceof JarURLConnection) {
@ -516,7 +516,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol @@ -516,7 +516,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
throws IOException {
File rootDir = null;
File rootDir;
try {
rootDir = rootDirResource.getFile().getAbsoluteFile();
}

9
org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java

@ -82,7 +82,7 @@ public class AnnotationMetadataTests extends TestCase { @@ -82,7 +82,7 @@ public class AnnotationMetadataTests extends TestCase {
assertEquals(String.class.getName(), specialAttrs.get("clazz"));
assertEquals(Thread.State.NEW, specialAttrs.get("state"));
}
private void doTestMethodAnnotationInfo(AnnotationMetadata classMetadata) {
Set<MethodMetadata> methods = classMetadata.getAnnotatedMethods("org.springframework.beans.factory.annotation.Autowired");
assertEquals(1, methods.size());
@ -111,14 +111,11 @@ public class AnnotationMetadataTests extends TestCase { @@ -111,14 +111,11 @@ public class AnnotationMetadataTests extends TestCase {
@Autowired
public void doWork(@Qualifier("myColor") java.awt.Color color) {
}
@Test
public void doSleep()
{
public void doSleep() {
}
}
}

Loading…
Cancel
Save