harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r439967 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java: java/beans/beancontext/BeanContextSupport.java org/apache/harmony/beans/internal/nls/messages.properties
Date Mon, 04 Sep 2006 07:35:53 GMT
Author: mloenko
Date: Mon Sep  4 00:35:52 2006
New Revision: 439967

URL: http://svn.apache.org/viewvc?view=rev&rev=439967
Log:
applied patch for HARMONY-1169
[classlib][beans] no expected IllegalArgumentException for BeanContextSupport.getResource(...)
fixed internationalization in the patch

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/internal/nls/messages.properties

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java?view=diff&rev=439967&r1=439966&r2=439967
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
Mon Sep  4 00:35:52 2006
@@ -779,7 +779,12 @@
             throw new NullPointerException(Messages.getString("beans.2C")); //$NON-NLS-1$
         }
 
-        // Load resource using the same ClassLoader as BeanContextChild specified
+        if (!containsKey(bcc)) {
+            throw new IllegalArgumentException(Messages.getString("beans.46")); //$NON-NLS-1$
+        }
+
+        // Load resource using the same ClassLoader as BeanContextChild
+        // specified
         // If NullPointerException occurs try to load it as system resource
         try {
             return bcc.getClass().getClassLoader().getResource(name);
@@ -807,6 +812,10 @@
         // The child should not be null
         if (bcc == null) {
             throw new NullPointerException(Messages.getString("beans.2C")); //$NON-NLS-1$
+        }
+
+        if (!containsKey(bcc)) {
+            throw new IllegalArgumentException(Messages.getString("beans.46")); //$NON-NLS-1$
         }
 
         // Load resource using the same ClassLoader as BeanContextChild specified

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/internal/nls/messages.properties?view=diff&rev=439967&r1=439966&r2=439967
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/internal/nls/messages.properties
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/internal/nls/messages.properties
Mon Sep  4 00:35:52 2006
@@ -84,3 +84,4 @@
 beans.43=Cannot convert {0} to char
 beans.44=for property {0} no getter(setter) is found
 beans.45=method name is not generated: error in getMethodName()
+beans.46=Not a valid child



Mime
View raw message