summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2006-06-02 15:17:58 +0000
committeraclement <aclement>2006-06-02 15:17:58 +0000
commit73d96a5cf3bb38a2fbda7f8ae00a7725c9728ec6 (patch)
tree722923aed2440ccdaa95edfb5efe318767efb6c1 /weaver
parent319a0d15703c098b74335ecb9672f58166bf3c5b (diff)
downloadaspectj-73d96a5cf3bb38a2fbda7f8ae00a7725c9728ec6.tar.gz
aspectj-73d96a5cf3bb38a2fbda7f8ae00a7725c9728ec6.zip
fall back logic when on 1.5 vm but necessary classes cant be found (test machine happy?)
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateFactory.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateFactory.java b/weaver/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateFactory.java
index 83cf4c20c..ab0c2eb6a 100644
--- a/weaver/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateFactory.java
+++ b/weaver/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateFactory.java
@@ -48,6 +48,7 @@ public class ReflectionBasedReferenceTypeDelegateFactory {
}
}
+ // can return 'null' if we can't find the class
private static ReflectionBasedReferenceTypeDelegate create15Delegate(ReferenceType forReferenceType, Class forClass, ClassLoader usingClassLoader, World inWorld) {
try {
Class delegateClass = Class.forName("org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate");//,false,usingClassLoader);//ReflectionBasedReferenceTypeDelegate.class.getClassLoader());
@@ -55,7 +56,8 @@ public class ReflectionBasedReferenceTypeDelegateFactory {
ret.initialize(forReferenceType,forClass,usingClassLoader,inWorld);
return ret;
} catch (ClassNotFoundException cnfEx) {
- throw new IllegalStateException("Attempted to create Java 1.5 reflection based delegate but org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate was not found on classpath");
+ return null;
+ //throw new IllegalStateException("Attempted to create Java 1.5 reflection based delegate but org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate was not found on classpath");
} catch (InstantiationException insEx) {
throw new IllegalStateException("Attempted to create Java 1.5 reflection based delegate but InstantiationException: " + insEx + " occured");
} catch (IllegalAccessException illAccEx) {
@@ -71,7 +73,8 @@ public class ReflectionBasedReferenceTypeDelegateFactory {
GenericSignatureInformationProvider ret = (GenericSignatureInformationProvider) cons.newInstance(new Object[] {inWorld});
return ret;
} catch (ClassNotFoundException cnfEx) {
- throw new IllegalStateException("Attempted to create Java 1.5 generic signature provider but org.aspectj.weaver.reflect.Java15GenericSignatureInformationProvider was not found on classpath");
+ // drop through and create a 14 provider...
+ // throw new IllegalStateException("Attempted to create Java 1.5 generic signature provider but org.aspectj.weaver.reflect.Java15GenericSignatureInformationProvider was not found on classpath");
} catch (NoSuchMethodException nsmEx) {
throw new IllegalStateException("Attempted to create Java 1.5 generic signature provider but: " + nsmEx + " occured");
} catch (InstantiationException insEx) {
@@ -81,9 +84,8 @@ public class ReflectionBasedReferenceTypeDelegateFactory {
} catch (IllegalAccessException illAcc) {
throw new IllegalStateException("Attempted to create Java 1.5 generic signature provider but: " + illAcc + " occured");
}
- } else {
- return new Java14GenericSignatureInformationProvider();
}
+ return new Java14GenericSignatureInformationProvider();
}
/**