Project: AspectJ
Bug 116949 [waitingOnAJDTdrop]Exception thrown from AspectJ compiler
Reported: 2005-11-17 17:09:48 | Status: verified fixed

java.lang.ClassCastException at org.aspectj.weaver.bcel.BcelClassWeaver.checkForOverride (BcelClassWeaver.java:607) at org.aspectj.weaver.bcel.BcelClassWeaver.calculateAnyRequiredBridgeMethods (BcelClassWeaver.java:676) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1537) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1485) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1266) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1088) at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.weave (AjCompilerAdapter.java:300) at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.afterCompiling (AjCompilerAdapter.java:178) at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$afterReturning$org_aspect j_ajdt_internal_compiler_CompilerAdapter$2$f9cc9ca0(CompilerAdapter.aj:70) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile (Compiler.java:367) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation (AjBuildManager.java:809) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild (AjBuildManager.java:254) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild (AjBuildManager.java:163) at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:117) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run (AspectJBuildManager.java:191) trouble in: public class ts.simul.client.AbstractClient$OptionSetter extends ts.util.CmdLineProgram$OptionSetterBase: final ts.simul.client.AbstractClient this$0 private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 public void <init>(ts.simul.client.AbstractClient) org.aspectj.weaver.MethodDeclarationLineNumber: 59:1411 : ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this (line 60) ALOAD_1 PUTFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this (line 59) ALOAD_1 INVOKESPECIAL ts.util.CmdLineProgram$OptionSetterBase.<init> (Lts/util/CmdLineProgram;)V constructor-execution(void ts.simul.client.AbstractClient$OptionSetter.<init> (ts.simul.client.AbstractClient)) | RETURN constructor-execution(void ts.simul.client.AbstractClient$OptionSetter.<init> (ts.simul.client.AbstractClient)) end public void <init>(ts.simul.client.AbstractClient) public boolean setOption_file(String) throws ts.util.IllegalProgramArgumentException org.aspectj.weaver.MethodDeclarationLineNumber: 62:1469 : method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_file(java.lang.String)) | ALOAD_1 // java.lang.String optParam (line 65) | method-call(int java.lang.String.length()) | | INVOKEVIRTUAL java.lang.String.length ()I | method-call(int java.lang.String.length()) | IFLE L1 | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this (line 66) | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | ALOAD_1 // java.lang.String optParam | PUTFIELD ts.simul.client.AbstractClient.fileName Ljava/lang/String; | NEW java.io.File (line 67) | DUP | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | GETFIELD ts.simul.client.AbstractClient.fileName Ljava/lang/String; | constructor-call(void java.io.File.<init>(java.lang.String)) | | INVOKESPECIAL java.io.File.<init> (Ljava/lang/String;)V | constructor-call(void java.io.File.<init>(java.lang.String)) | ASTORE_2 | ALOAD_2 // java.io.File file (line 68) | method-call(boolean java.io.File.exists()) | | INVOKEVIRTUAL java.io.File.exists ()Z | method-call(boolean java.io.File.exists()) | IFNE L0 | NEW ts.util.IllegalProgramArgumentException (line 69) | DUP | NEW java.lang.StringBuilder | DUP | LDC "Cannot find file: [" | constructor-call(void java.lang.StringBuilder.<init>(java.lang.String)) | | INVOKESPECIAL java.lang.StringBuilder.<init> (Ljava/lang/String;)V | constructor-call(void java.lang.StringBuilder.<init>(java.lang.String)) | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | GETFIELD ts.simul.client.AbstractClient.fileName Ljava/lang/String; | method-call(java.lang.StringBuilder java.lang.StringBuilder.append (java.lang.String)) | | INVOKEVIRTUAL java.lang.StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | method-call(java.lang.StringBuilder java.lang.StringBuilder.append (java.lang.String)) | LDC "]" | method-call(java.lang.StringBuilder java.lang.StringBuilder.append (java.lang.String)) | | INVOKEVIRTUAL java.lang.StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | method-call(java.lang.StringBuilder java.lang.StringBuilder.append (java.lang.String)) | method-call(java.lang.String java.lang.StringBuilder.toString()) | | INVOKEVIRTUAL java.lang.StringBuilder.toString () Ljava/lang/String; | method-call(java.lang.String java.lang.StringBuilder.toString()) | constructor-call(void ts.util.IllegalProgramArgumentException.<init> (java.lang.String)) | | INVOKESPECIAL ts.util.IllegalProgramArgumentException.<init> (Ljava/lang/String;)V | constructor-call(void ts.util.IllegalProgramArgumentException.<init> (java.lang.String)) | ATHROW | L0: ICONST_1 (line 70) | IRETURN | L1: ICONST_0 (line 73) | IRETURN method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_file(java.lang.String)) end public boolean setOption_file(String) throws ts.util.IllegalProgramArgumentException public boolean setOption_class(String) throws ts.util.IllegalProgramArgumentException org.aspectj.weaver.MethodDeclarationLineNumber: 76:1971 : method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_class(java.lang.String)) | ALOAD_1 // java.lang.String optParam (line 79) | method-call(int java.lang.String.length()) | | INVOKEVIRTUAL java.lang.String.length ()I | method-call(int java.lang.String.length()) | IFLE L1 | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this (line 80) | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | ALOAD_1 // java.lang.String optParam | PUTFIELD ts.simul.client.AbstractClient.className Ljava/lang/String; | catch ts.simul.SimulationException -> E0 | | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this (line 82) | | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this | | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | | GETFIELD ts.simul.client.AbstractClient.className Ljava/lang/String; | | method-call(java.lang.Class ts.simul.SceneFactory.getSceneClass (java.lang.String)) | | | INVOKESTATIC ts.simul.SceneFactory.getSceneClass (Ljava/lang/String;)Ljava/lang/Class; | | method-call(java.lang.Class ts.simul.SceneFactory.getSceneClass (java.lang.String)) | | PUTFIELD ts.simul.client.AbstractClient.sceneClass Ljava/lang/Class; | | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this (line 83) | | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | | method-call(void ts.simul.client.AbstractClient.setBeanInfoSearchPath()) | | | INVOKESTATIC ts.simul.Architecture.aspectOf () Lts/simul/Architecture; | | | GETSTATIC ts.simul.client.AbstractClient$OptionSetter.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; | | | INVOKEVIRTUAL ts.simul.Architecture.ajc$before$ts_simul_Architecture$1$ae285a4d (Lorg/aspectj/lang/JoinPoint$StaticPart;)V | | | INVOKEVIRTUAL ts.simul.client.AbstractClient.setBeanInfoSearchPath ()V | | method-call(void ts.simul.client.AbstractClient.setBeanInfoSearchPath()) | | GOTO L0 | catch ts.simul.SimulationException -> E0 | E0: ASTORE_2 (line 85) | NEW ts.util.IllegalProgramArgumentException (line 86) | DUP | ALOAD_2 // ts.simul.SimulationException e | method-call(java.lang.String ts.simul.SimulationException.getMessage()) | | INVOKEVIRTUAL ts.simul.SimulationException.getMessage () Ljava/lang/String; | method-call(java.lang.String ts.simul.SimulationException.getMessage()) | constructor-call(void ts.util.IllegalProgramArgumentException.<init> (java.lang.String)) | | INVOKESPECIAL ts.util.IllegalProgramArgumentException.<init> (Ljava/lang/String;)V | constructor-call(void ts.util.IllegalProgramArgumentException.<init> (java.lang.String)) | ATHROW | L0: ICONST_1 (line 88) | IRETURN | L1: ICONST_0 (line 91) | IRETURN method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_class(java.lang.String)) end public boolean setOption_class(String) throws ts.util.IllegalProgramArgumentException public boolean setOption_name(String) org.aspectj.weaver.MethodDeclarationLineNumber: 94:2593 : method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_name(java.lang.String)) | ALOAD_0 // ts.simul.client.AbstractClient$OptionSetter this (line 96) | GETFIELD ts.simul.client.AbstractClient$OptionSetter.this$0 Lts/simul/client/AbstractClient; | ALOAD_1 // java.lang.String optParam | PUTFIELD ts.simul.client.AbstractClient.sceneName Ljava/lang/String; | ICONST_1 (line 97) | IRETURN method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_name(java.lang.String)) end public boolean setOption_name(String) public boolean setOption_actors(String) org.aspectj.weaver.MethodDeclarationLineNumber: 100:2739 : method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_actors(java.lang.String)) | catch java.lang.NumberFormatException -> E0 | | ALOAD_1 // java.lang.String optParam (line 103) | | method-call(int java.lang.Integer.parseInt(java.lang.String)) | | | INVOKESTATIC java.lang.Integer.parseInt (Ljava/lang/String;) I | | method-call(int java.lang.Integer.parseInt(java.lang.String)) | | ISTORE_2 | | GOTO L0 | catch java.lang.NumberFormatException -> E0 | E0: ASTORE_2 // int n (line 105) | ICONST_0 (line 106) | IRETURN | L0: ICONST_1 (line 108) | IRETURN method-execution(boolean ts.simul.client.AbstractClient$OptionSetter.setOption_actors(java.lang.String)) end public boolean setOption_actors(String) end public class ts.simul.client.AbstractClient$OptionSetter when weaving type ts.simul.client.AbstractClient$OptionSetter when weaving classes when weaving when incrementally building BuildConfig [c:\Projects\eclipse\.metadata\.plugins\org.eclipse.ajdt.core\TS.generated.lst] #Files=79

Files changed in fix:
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java