directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: rev 56529 - incubator/directory/naming/trunk/factory/src/java/org/apache/naming/factory
Date Wed, 03 Nov 2004 21:40:51 GMT
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 {

Mime
View raw message