diff options
author | acolyer <acolyer> | 2005-11-23 13:14:22 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-11-23 13:14:22 +0000 |
commit | 81e6b60e4eabeaf322651941c65f9f24a0ea80a9 (patch) | |
tree | 62855fa8dfaf6c7dc6335995835698fece4e3576 /aspectj5rt/java5-src | |
parent | 11ab99f1c46007b084873d1050da2f9e78e43c82 (diff) | |
download | aspectj-81e6b60e4eabeaf322651941c65f9f24a0ea80a9.tar.gz aspectj-81e6b60e4eabeaf322651941c65f9f24a0ea80a9.zip |
tests and fix for pr116254
Diffstat (limited to 'aspectj5rt/java5-src')
-rw-r--r-- | aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/DeclareSoftImpl.java | 5 | ||||
-rw-r--r-- | aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/StringToType.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/DeclareSoftImpl.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/DeclareSoftImpl.java index c980cdf8f..4c8ea4ead 100644 --- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/DeclareSoftImpl.java +++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/DeclareSoftImpl.java @@ -28,11 +28,12 @@ public class DeclareSoftImpl implements DeclareSoft { private String missingTypeName; - public DeclareSoftImpl(AjType declaringType, String pcut, String exceptionTypeName) { + public DeclareSoftImpl(AjType<?> declaringType, String pcut, String exceptionTypeName) { this.declaringType = declaringType; this.pointcut = new PointcutExpressionImpl(pcut); try { - this.exceptionType = AjTypeSystem.getAjType(Class.forName(exceptionTypeName)); + ClassLoader cl = declaringType.getJavaClass().getClassLoader(); + this.exceptionType = AjTypeSystem.getAjType(Class.forName(exceptionTypeName,false,cl)); } catch (ClassNotFoundException ex) { this.missingTypeName = exceptionTypeName; } diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/StringToType.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/StringToType.java index 7cf35ffb7..06201c559 100644 --- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/StringToType.java +++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/StringToType.java @@ -40,7 +40,7 @@ public class StringToType { throws ClassNotFoundException { try { if (typeName.indexOf("<") == -1) { - return AjTypeSystem.getAjType(Class.forName(typeName)); + return AjTypeSystem.getAjType(Class.forName(typeName,false,classScope.getClassLoader())); } else { return makeParameterizedType(typeName,classScope); } @@ -60,7 +60,7 @@ public class StringToType { throws ClassNotFoundException { int paramStart = typeName.indexOf('<'); String baseName = typeName.substring(0, paramStart); - final Class baseClass = Class.forName(baseName); + final Class baseClass = Class.forName(baseName,false,classScope.getClassLoader()); int paramEnd = typeName.lastIndexOf('>'); String params = typeName.substring(paramStart+1,paramEnd); final Type[] typeParams = commaSeparatedListToTypeArray(params,classScope); |