From directory-cvs-return-2053-apmail-incubator-directory-cvs-archive=incubator.apache.org@incubator.apache.org Wed Nov 03 21:40:54 2004 Return-Path: Delivered-To: apmail-incubator-directory-cvs-archive@www.apache.org Received: (qmail 8806 invoked from network); 3 Nov 2004 21:40:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Nov 2004 21:40:54 -0000 Received: (qmail 77813 invoked by uid 500); 3 Nov 2004 21:40:53 -0000 Delivered-To: apmail-incubator-directory-cvs-archive@incubator.apache.org Received: (qmail 77768 invoked by uid 500); 3 Nov 2004 21:40:53 -0000 Mailing-List: contact directory-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: directory-dev@incubator.apache.org Delivered-To: mailing list directory-cvs@incubator.apache.org Received: (qmail 77752 invoked by uid 99); 3 Nov 2004 21:40:53 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 03 Nov 2004 13:40:52 -0800 Received: (qmail 8761 invoked by uid 65534); 3 Nov 2004 21:40:51 -0000 Date: 3 Nov 2004 21:40:51 -0000 Message-ID: <20041103214051.8754.qmail@minotaur.apache.org> From: psteitz@apache.org To: directory-cvs@incubator.apache.org Subject: svn commit: rev 56529 - incubator/directory/naming/trunk/factory/src/java/org/apache/naming/factory X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: psteitz Date: Wed Nov 3 13:40:51 2004 New Revision: 56529 Modified: incubator/directory/naming/trunk/factory/src/java/org/apache/naming/factory/BeanFactory.java Log: Added support for boolean values and chained exceptions. Jira: DIRNAMING-4 Contributed by: Jarek Gawor Modified: incubator/directory/naming/trunk/factory/src/java/org/apache/naming/factory/BeanFactory.java ============================================================================== --- incubator/directory/naming/trunk/factory/src/java/org/apache/naming/factory/BeanFactory.java (original) +++ incubator/directory/naming/trunk/factory/src/java/org/apache/naming/factory/BeanFactory.java Wed Nov 3 13:40:51 2004 @@ -186,6 +186,9 @@ } else if (propType.equals(Double.class) || propType.equals(double.class)) { valueArray[0] = new Double(value); + } else if (propType.equals(Boolean.class) + || propType.equals(boolean.class)) { + valueArray[0] = new Boolean(value); } else { throw new NamingException ("String conversion for property type '" @@ -217,13 +220,21 @@ return bean; } catch (java.beans.IntrospectionException ie) { - throw new NamingException(ie.getMessage()); + NamingException ne = new NamingException(ie.getMessage()); + ne.setRootCause(ie); + throw ne; } catch (java.lang.IllegalAccessException iae) { - throw new NamingException(iae.getMessage()); + NamingException ne = new NamingException(iae.getMessage()); + ne.setRootCause(iae); + throw ne; } catch (java.lang.InstantiationException ie2) { - throw new NamingException(ie2.getMessage()); + NamingException ne = new NamingException(ie2.getMessage()); + ne.setRootCause(ie2); + throw ne; } catch (java.lang.reflect.InvocationTargetException ite) { - throw new NamingException(ite.getMessage()); + NamingException ne = new NamingException(ite.getMessage()); + ne.setRootCause(ite); + throw ne; } } else {