polishing

This commit is contained in:
Juergen Hoeller 2009-05-12 23:39:56 +00:00
parent 59101c096f
commit f1c852b14c
2 changed files with 8 additions and 11 deletions

View File

@ -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
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
protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
throws IOException {
File rootDir = null;
File rootDir;
try {
rootDir = rootDirResource.getFile().getAbsoluteFile();
}

View File

@ -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 {
@Autowired
public void doWork(@Qualifier("myColor") java.awt.Color color) {
}
@Test
public void doSleep()
{
public void doSleep() {
}
}
}