]> source.dussan.org Git - aspectj.git/commitdiff
typemap accessible
authoraclement <aclement>
Fri, 11 Dec 2009 04:24:12 +0000 (04:24 +0000)
committeraclement <aclement>
Fri, 11 Dec 2009 04:24:12 +0000 (04:24 +0000)
loadtime/testsrc/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java

index a481d1c89b54f15d0af7440811754bb6490044e9..2cdb5312bad478c26975a1b30acb4b33e54cbd2c 100644 (file)
@@ -376,15 +376,7 @@ public class ClassLoaderWeavingAdaptorTest extends TestCase {
        // --- infrastructure ---
 
        private TypeMap accessTypeMap(TestClassLoaderWeavingAdaptor adaptor) {
-               try {
-                       BcelWorld world = adaptor.getWorld();
-                       Field f = World.class.getDeclaredField("typeMap");
-                       f.setAccessible(true);
-                       TypeMap typeMap = (TypeMap) f.get(world);
-                       return typeMap;
-               } catch (Exception e) {
-                       throw new RuntimeException(e);
-               }
+               return adaptor.getWorld().getTypeMap();
        }
 
        public TestClassLoaderWeavingAdaptor getAdaptor(String includePattern, String excludePattern) {