You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/08/28 14:59:09 UTC
svn commit: r990357 -
/pivot/trunk/core/src/org/apache/pivot/beans/BXMLSerializer.java
Author: gbrown
Date: Sat Aug 28 12:59:08 2010
New Revision: 990357
URL: http://svn.apache.org/viewvc?rev=990357&view=rev
Log:
Gracefully handle missing resource bundle in BXMLSerializer.
Modified:
pivot/trunk/core/src/org/apache/pivot/beans/BXMLSerializer.java
Modified: pivot/trunk/core/src/org/apache/pivot/beans/BXMLSerializer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/beans/BXMLSerializer.java?rev=990357&r1=990356&r2=990357&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/beans/BXMLSerializer.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/beans/BXMLSerializer.java Sat Aug 28 12:59:08 2010
@@ -1010,13 +1010,10 @@ public class BXMLSerializer implements S
if (value.charAt(0) == RESOURCE_KEY_PREFIX) {
attribute.value = value;
} else {
- if (resources == null) {
- throw new IllegalStateException("Resource bundle is undefined.");
- }
-
- attribute.value = JSON.get(resources, value);
-
- if (attribute.value == null) {
+ if (resources != null
+ && JSON.containsKey(resources, value)) {
+ attribute.value = JSON.get(resources, value);
+ } else {
attribute.value = value;
}
}