Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@apache.org Received: (qmail 40866 invoked from network); 3 Dec 2002 00:33:27 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 3 Dec 2002 00:33:27 -0000 Received: (qmail 26491 invoked by uid 97); 3 Dec 2002 00:34:37 -0000 Delivered-To: qmlist-jakarta-archive-avalon-dev@jakarta.apache.org Received: (qmail 26475 invoked by uid 97); 3 Dec 2002 00:34:37 -0000 Mailing-List: contact avalon-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-dev@jakarta.apache.org Received: (qmail 26463 invoked by uid 98); 3 Dec 2002 00:34:36 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: Peter Donald To: avalon-dev@jakarta.apache.org Subject: [patch] Fortress proxy bug Date: Tue, 3 Dec 2002 11:43:18 +1100 User-Agent: KMail/1.4.2 X-Notice: Duplication and redistribution prohibited without consent of the author. X-Copyright: (C) 2002 Peter Donald. X-Wisdom: A right is not what someone gives you; it's what no one can take from you. MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_60QIKY81NW88MCXY2KMD" Message-Id: <200212031143.18296.peter@realityforge.org> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --------------Boundary-00=_60QIKY81NW88MCXY2KMD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Fixes a bug where service interfaces in superclass were not proxied. --=20 Cheers, Peter Donald --------------------------------------------------- "Therefore it can be said that victorious warriors=20 win first, and then go to battle, while defeated=20 warriors go to battle first, and then seek to win."=20 - Sun Tzu, the Art Of War ---------------------------------------------------=20 --------------Boundary-00=_60QIKY81NW88MCXY2KMD Content-Type: text/plain; charset="us-ascii"; name="fortress.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fortress.txt" Index: src/java/org/apache/excalibur/fortress/handler/ProxyHelper.java =================================================================== RCS file: /home/cvspublic/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ProxyHelper.java,v retrieving revision 1.2 diff -u -r1.2 ProxyHelper.java --- src/java/org/apache/excalibur/fortress/handler/ProxyHelper.java 9 Nov 2002 07:44:38 -0000 1.2 +++ src/java/org/apache/excalibur/fortress/handler/ProxyHelper.java 3 Dec 2002 00:31:28 -0000 @@ -157,6 +157,23 @@ private static Class[] guessWorkInterfaces( final Class clazz ) { final ArrayList list = new ArrayList(); + guessWorkInterfaces( clazz, list ); + + list.add( Component.class ); + return (Class[])list.toArray( new Class[ list.size() ] ); + } + + /** + * Get a list of interfaces to proxy by scanning through + * all interfaces a class implements and skipping invalid interfaces + * (as defined in {@link #INVALID_INTERFACES}). + * + * @param clazz the class + * @param list the list of current work interfaces + */ + private static void guessWorkInterfaces( final Class clazz, + final ArrayList list ) + { final Class[] interfaces = clazz.getInterfaces(); boolean skip = false; @@ -177,8 +194,7 @@ list.add( interfaces[ i ] ); } } - list.add( Component.class ); - return (Class[])list.toArray( new Class[ list.size() ] ); + guessWorkInterfaces( clazz.getSuperclass(),list ); } } --------------Boundary-00=_60QIKY81NW88MCXY2KMD Content-Type: text/plain; charset=us-ascii -- To unsubscribe, e-mail: For additional commands, e-mail: --------------Boundary-00=_60QIKY81NW88MCXY2KMD--