diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-09-01 18:39:35 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-09-01 18:39:35 +0200 |
commit | 60a62bced8894a90b22725482fb33a9eed967554 (patch) | |
tree | 35c37b0baa4896cf0bb2aa5934783c85a1251b70 | |
parent | cb091204f4bfc7f9971fc296903f7bc2a163f085 (diff) | |
download | lombok-60a62bced8894a90b22725482fb33a9eed967554.tar.gz lombok-60a62bced8894a90b22725482fb33a9eed967554.tar.bz2 lombok-60a62bced8894a90b22725482fb33a9eed967554.zip |
Removed the various debug assist code in ClassLoaderWorkaround; the feature works now, no longer needed.
-rw-r--r-- | src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java b/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java index 42eeb02d..f5c8bbd3 100644 --- a/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java +++ b/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java @@ -55,49 +55,17 @@ public class ClassLoaderWorkaround { public static void transformCompilationUnitDeclaration(Object parser, Object cud) throws Exception { Method transformMethod = getTransformMethod(cud); try { - checkTypeCompatible(parser.getClass(), "org.eclipse.jdt.internal.compiler.parser.Parser"); - checkTypeCompatible(cud.getClass(), "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration"); - try { - transformMethod.invoke(null, parser, cud); - } catch ( IllegalArgumentException ex ) { - checkTypeCompatible2(parser.getClass(), "org.eclipse.jdt.internal.compiler.parser.Parser"); - checkTypeCompatible2(cud.getClass(), "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration"); - throw ex; - } + transformMethod.invoke(null, parser, cud); } catch ( InvocationTargetException e ) { throw sneakyThrow(e.getCause()); } } - private static void checkTypeCompatible(Class<? extends Object> c, String expected) { - StringBuilder sb = new StringBuilder(); - while ( c != null ) { - if ( c.getName().equals(expected) ) return; - sb.append(" ").append(c.getName()); - c = c.getSuperclass(); - } - - System.err.println("Not a match to " + expected); - System.err.println(sb.toString()); - } - - private static void checkTypeCompatible2(Class<? extends Object> c, String expected) { - StringBuilder sb = new StringBuilder(); - while ( c != null ) { - sb.append(" ").append(c.getName()); - c = c.getSuperclass(); - } - - System.err.println("Expecting " + expected); - System.err.println(sb.toString()); - } - private static Method getTransformMethod(Object cud) throws ClassNotFoundException { ClassLoader contextLoader = Thread.currentThread().getContextClassLoader(); synchronized ( transform ) { if ( !transform.containsKey(contextLoader)) { - System.out.println("Creating classloader: " + Thread.currentThread()); transform.put(contextLoader, findTransformMethod(cud)); } |