Return-Path: Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 89874 invoked by uid 500); 30 May 2003 15:39:15 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 89863 invoked by uid 500); 30 May 2003 15:39:15 -0000 Received: (qmail 89860 invoked from network); 30 May 2003 15:39:14 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 30 May 2003 15:39:14 -0000 Received: (qmail 14494 invoked by uid 1152); 30 May 2003 15:39:14 -0000 Date: 30 May 2003 15:39:14 -0000 Message-ID: <20030530153914.14492.qmail@icarus.apache.org> From: bloritsch@apache.org To: avalon-excalibur-cvs@apache.org Subject: cvs commit: avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/factory BCELCodeGenerator.java BCELWrapperGenerator.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bloritsch 2003/05/30 08:39:14 Modified: fortress/src/java/org/apache/avalon/fortress/impl/factory BCELCodeGenerator.java BCELWrapperGenerator.java Log: Future proof the BCEL classes--the CVS BCEL throws a new ClassNotFoundException for the affected method. Revision Changes Path 1.4 +11 -11 avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/factory/BCELCodeGenerator.java Index: BCELCodeGenerator.java =================================================================== RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/factory/BCELCodeGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BCELCodeGenerator.java 14 May 2003 15:54:45 -0000 1.3 +++ BCELCodeGenerator.java 30 May 2003 15:39:13 -0000 1.4 @@ -256,7 +256,7 @@ m_constPoolGenerator ); m_instructionList.append( - m_instructionFactory.createLoad( Type.OBJECT, 0 ) ); + InstructionFactory.createLoad( Type.OBJECT, 0 ) ); m_instructionList.append( m_instructionFactory.createInvoke( m_wrapperSuperclassName, @@ -265,16 +265,16 @@ Type.NO_ARGS, Constants.INVOKESPECIAL ) ); m_instructionList.append( - m_instructionFactory.createLoad( Type.OBJECT, 0 ) ); + InstructionFactory.createLoad( Type.OBJECT, 0 ) ); m_instructionList.append( - m_instructionFactory.createLoad( Type.OBJECT, 1 ) ); + InstructionFactory.createLoad( Type.OBJECT, 1 ) ); m_instructionList.append( m_instructionFactory.createFieldAccess( m_wrapperClassName, WRAPPED_CLASS_FN, m_classToWrapType, Constants.PUTFIELD ) ); - m_instructionList.append( m_instructionFactory.createReturn( Type.VOID ) ); + m_instructionList.append( InstructionFactory.createReturn( Type.VOID ) ); mg.setMaxStack(); mg.setMaxLocals(); @@ -316,7 +316,7 @@ m_constPoolGenerator ); m_instructionList.append( - m_instructionFactory.createLoad( Type.OBJECT, 0 ) ); + InstructionFactory.createLoad( Type.OBJECT, 0 ) ); m_instructionList.append( m_instructionFactory.createFieldAccess( m_wrapperClassName, @@ -324,7 +324,7 @@ m_classToWrapType, Constants.GETFIELD ) ); m_instructionList.append( - m_instructionFactory.createReturn( Type.OBJECT ) ); + InstructionFactory.createReturn( Type.OBJECT ) ); mg.setMaxStack(); mg.setMaxLocals(); @@ -397,7 +397,7 @@ // Loading the wrapped class instance onto the stack ... m_instructionList.append( - m_instructionFactory.createLoad( Type.OBJECT, 0 ) ); + InstructionFactory.createLoad( Type.OBJECT, 0 ) ); m_instructionList.append( m_instructionFactory.createFieldAccess( m_wrapperClassName, @@ -411,7 +411,7 @@ for ( int i = 0; i < parameterTypes.length; ++i ) { m_instructionList.append( - m_instructionFactory.createLoad( parameterTypes[i], stackIndex ) ); + InstructionFactory.createLoad( parameterTypes[i], stackIndex ) ); stackIndex += parameterTypes[i].getSize(); } @@ -426,7 +426,7 @@ Constants.INVOKEVIRTUAL ) ); // Creating return statement ... - m_instructionList.append( m_instructionFactory.createReturn( returnType ) ); + m_instructionList.append( InstructionFactory.createReturn( returnType ) ); mg.setMaxStack(); mg.setMaxLocals(); @@ -481,7 +481,7 @@ * @throws IllegalStateException If this instance has not been initialized */ public Method[] createImplementation( final JavaClass interfaceToImplement ) - throws IllegalArgumentException, IllegalStateException + throws Exception { if ( interfaceToImplement == null ) { @@ -573,7 +573,7 @@ * @throws NullPointerException if the interfaceToImplement is null */ static Method[] extractMethods( final JavaClass interfaceToImplement ) - throws IllegalArgumentException, NullPointerException + throws Exception { if ( interfaceToImplement == null ) { 1.5 +1 -1 avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/factory/BCELWrapperGenerator.java Index: BCELWrapperGenerator.java =================================================================== RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/factory/BCELWrapperGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BCELWrapperGenerator.java 29 May 2003 16:42:45 -0000 1.4 +++ BCELWrapperGenerator.java 30 May 2003 15:39:13 -0000 1.5 @@ -327,7 +327,7 @@ * byte code for * @return byte[] The generated byte code */ - private byte[] buildWrapper( final JavaClass[] interfacesToImplement ) + private byte[] buildWrapper( final JavaClass[] interfacesToImplement ) throws Exception { // Create field for the wrapped class m_classGenerator.addField( m_codeGenerator.createWrappedClassField() ); --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org