geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r219991 - /geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
Date Thu, 21 Jul 2005 03:37:03 GMT
Author: ammulder
Date: Wed Jul 20 20:37:00 2005
New Revision: 219991

URL: http://svn.apache.org/viewcvs?rev=219991&view=rev
Log:
More reasonable message when trying to look up a non-persistent attribute
  when the GBean is DESTROYED.  GERONIMO-727.

Modified:
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java?rev=219991&r1=219990&r2=219991&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
Wed Jul 20 20:37:00 2005
@@ -624,7 +624,11 @@
         if (state != DESTROYED || attribute.isFramework()) {
             return attribute.getValue(instance);
         } else {
-            return attribute.getPersistentValue();
+            if(attribute.isPersistent()) {
+                return attribute.getPersistentValue();
+            } else {
+                throw new IllegalStateException("Cannot retrieve the value for non-persistent
attribute "+attributeName+" when GBeanInstance is DESTROYED");
+            }
         }
     }
 



Mime
View raw message