polishing
This commit is contained in:
parent
59101c096f
commit
f1c852b14c
|
|
@ -171,7 +171,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
|
||||||
try {
|
try {
|
||||||
Class fileLocatorClass = PathMatchingResourcePatternResolver.class.getClassLoader().loadClass(
|
Class fileLocatorClass = PathMatchingResourcePatternResolver.class.getClassLoader().loadClass(
|
||||||
"org.eclipse.core.runtime.FileLocator");
|
"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");
|
logger.debug("Found Equinox FileLocator for OSGi bundle URL resolution");
|
||||||
}
|
}
|
||||||
catch (Throwable ex) {
|
catch (Throwable ex) {
|
||||||
|
|
@ -420,9 +420,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
URLConnection con = rootDirResource.getURL().openConnection();
|
URLConnection con = rootDirResource.getURL().openConnection();
|
||||||
JarFile jarFile = null;
|
JarFile jarFile;
|
||||||
String jarFileUrl = null;
|
String jarFileUrl;
|
||||||
String rootEntryPath = null;
|
String rootEntryPath;
|
||||||
boolean newJarFile = false;
|
boolean newJarFile = false;
|
||||||
|
|
||||||
if (con instanceof JarURLConnection) {
|
if (con instanceof JarURLConnection) {
|
||||||
|
|
@ -516,7 +516,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
|
||||||
protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
|
protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
File rootDir = null;
|
File rootDir;
|
||||||
try {
|
try {
|
||||||
rootDir = rootDirResource.getFile().getAbsoluteFile();
|
rootDir = rootDirResource.getFile().getAbsoluteFile();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ public class AnnotationMetadataTests extends TestCase {
|
||||||
assertEquals(String.class.getName(), specialAttrs.get("clazz"));
|
assertEquals(String.class.getName(), specialAttrs.get("clazz"));
|
||||||
assertEquals(Thread.State.NEW, specialAttrs.get("state"));
|
assertEquals(Thread.State.NEW, specialAttrs.get("state"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doTestMethodAnnotationInfo(AnnotationMetadata classMetadata) {
|
private void doTestMethodAnnotationInfo(AnnotationMetadata classMetadata) {
|
||||||
Set<MethodMetadata> methods = classMetadata.getAnnotatedMethods("org.springframework.beans.factory.annotation.Autowired");
|
Set<MethodMetadata> methods = classMetadata.getAnnotatedMethods("org.springframework.beans.factory.annotation.Autowired");
|
||||||
assertEquals(1, methods.size());
|
assertEquals(1, methods.size());
|
||||||
|
|
@ -111,14 +111,11 @@ public class AnnotationMetadataTests extends TestCase {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void doWork(@Qualifier("myColor") java.awt.Color color) {
|
public void doWork(@Qualifier("myColor") java.awt.Color color) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void doSleep()
|
|
||||||
{
|
public void doSleep() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue