niclas 2004/04/05 02:42:35 Modified: fortress/container-impl/src/java/org/apache/avalon/fortress/impl/factory BCELCodeGenerator.java Log: Temporary fix for the BCEL incompatible change. Revision Changes Path 1.10 +17 -2 avalon-excalibur/fortress/container-impl/src/java/org/apache/avalon/fortress/impl/factory/BCELCodeGenerator.java Index: BCELCodeGenerator.java =================================================================== RCS file: /home/cvs/avalon-excalibur/fortress/container-impl/src/java/org/apache/avalon/fortress/impl/factory/BCELCodeGenerator.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- BCELCodeGenerator.java 28 Feb 2004 15:16:25 -0000 1.9 +++ BCELCodeGenerator.java 5 Apr 2004 09:42:35 -0000 1.10 @@ -419,8 +419,23 @@ meth.isFinal = methList[i].isFinal(); } } - - currentClass = currentClass.getSuperClass(); + try + { + currentClass = currentClass.getSuperClass(); + } catch( Exception e ) + { + // NH: Actually ClassNotFoundException is declared in the current CVS + // Head, but then we can't compile against BCEL5.5 which is our + // binary dependency, so I am catching Exception to cover both. + // + // I think this will happen if the superclass is not available + // in the classloaders, but I have no clue what is the proper action. + // I had to introduce this since BCEL decided to break compatibility + // and now throws the Exception. + // For now, throwing the absurd IllegalStateException as the rest + // of the codebase seems to be constructed around it. + throw new IllegalStateException("Superclass of java class could not be found: " + currentClass + ", " + e.getMessage() ); + } } if (null == meth.implementingClassName)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]