aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2013-01-28 13:50:12 -0800
committerAndy Clement <andrew.clement@gmail.com>2013-01-28 13:50:12 -0800
commit538ab026d392dfc778cacc1fa848bb9ce62db055 (patch)
tree1636df6ec190a8aed26efde962a9da201f2554d1 /org.aspectj.ajdt.core
parent25433050e15c2b6dd2b0af046f7c0c380383667a (diff)
downloadaspectj-538ab026d392dfc778cacc1fa848bb9ce62db055.tar.gz
aspectj-538ab026d392dfc778cacc1fa848bb9ce62db055.zip
377906 debug
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
index e545814e9..6cf7d2712 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
@@ -13,7 +13,9 @@
package org.aspectj.ajdt.internal.core.builder;
+import java.io.DataOutputStream;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.lang.ref.ReferenceQueue;
@@ -1497,6 +1499,22 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
this.resolvedTypeStructuresFromLastBuild.put(thisTime.getClassName(), new CompactTypeStructureRepresentation(
reader, isAspect));
} catch (ClassFormatException cfe) {
+ try {
+ String s = System.getProperty("aspectj.debug377906","false");
+ if (s.equalsIgnoreCase("true")) {
+ String location = System.getProperty("java.io.tmpdir","/tmp");
+ String name = thisTime.getClassName();
+ File f = File.createTempFile(location+File.separator+name, ".class");
+ StringBuilder debug = new StringBuilder();
+ debug.append("Debug377906: Dumping class called "+name+" to "+f.getName()+" size:"+thisTime.getBytes().length);
+ DataOutputStream dos = new DataOutputStream(new FileOutputStream(f));
+ dos.write(thisTime.getBytes());
+ dos.close();
+ throw new BCException(debug.toString(), cfe);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
throw new BCException("Unexpected problem processing class", cfe);
}
}