Return-Path: X-Original-To: apmail-openwebbeans-commits-archive@www.apache.org Delivered-To: apmail-openwebbeans-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0354310209 for ; Tue, 20 Aug 2013 13:00:15 +0000 (UTC) Received: (qmail 4230 invoked by uid 500); 20 Aug 2013 13:00:14 -0000 Delivered-To: apmail-openwebbeans-commits-archive@openwebbeans.apache.org Received: (qmail 4195 invoked by uid 500); 20 Aug 2013 13:00:13 -0000 Mailing-List: contact commits-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwebbeans.apache.org Delivered-To: mailing list commits@openwebbeans.apache.org Received: (qmail 4187 invoked by uid 99); 20 Aug 2013 13:00:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Aug 2013 13:00:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Aug 2013 13:00:10 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A65C62388980; Tue, 20 Aug 2013 12:59:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1515809 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/OwbCustomObjectInputStream.java Date: Tue, 20 Aug 2013 12:59:49 -0000 To: commits@openwebbeans.apache.org From: rmannibucau@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130820125949.A65C62388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rmannibucau Date: Tue Aug 20 12:59:49 2013 New Revision: 1515809 URL: http://svn.apache.org/r1515809 Log: fixing our OwbCustomObjectInputStream implementation to handle resolveProxyClass Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/OwbCustomObjectInputStream.java Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/OwbCustomObjectInputStream.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/OwbCustomObjectInputStream.java?rev=1515809&r1=1515808&r2=1515809&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/OwbCustomObjectInputStream.java (original) +++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/OwbCustomObjectInputStream.java Tue Aug 20 12:59:49 2013 @@ -22,6 +22,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectStreamClass; +import java.lang.reflect.Proxy; public class OwbCustomObjectInputStream extends ObjectInputStream { @@ -39,4 +40,22 @@ public class OwbCustomObjectInputStream return Class.forName(desc.getName(), false, classLoader); } + @Override + protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException + { + final Class[] cinterfaces = new Class[interfaces.length]; + for (int i = 0; i < interfaces.length; i++) + { + cinterfaces[i] = Class.forName(interfaces[i], false, classLoader); + } + + try + { + return Proxy.getProxyClass(classLoader, cinterfaces); + } + catch (IllegalArgumentException e) + { + throw new ClassNotFoundException(null, e); + } + } }