Hi,

This patch prevents the WTKX from preempting an otherwise good process.
It's a fix that's irrelevant to what I'm doing at the moment (learning about
data binding), but it's a code fix nonetheless.

/john/
Index: wtk/src/pivot/wtkx/WTKXSerializer.java
===================================================================
--- wtk/src/pivot/wtkx/WTKXSerializer.java      (revision 755752)
+++ wtk/src/pivot/wtkx/WTKXSerializer.java      (working copy)
@@ -730,25 +730,23 @@
             }
         } else {
             if (attributeValue.charAt(0) == URL_PREFIX) {
-                if (location == null) {
-                    throw new IllegalStateException("Base location is 
undefined.");
-                }
 
                 if (attributeValue.length() > 1) {
                     if (attributeValue.charAt(1) == URL_PREFIX) {
                         resolvedValue = attributeValue.substring(1);
+                    } else if (location == null) {
+                        throw new IllegalStateException("Base location is 
undefined.");
                     } else {
                         resolvedValue = new URL(location, 
attributeValue.substring(1));
                     }
                 }
             } else if (attributeValue.charAt(0) == RESOURCE_KEY_PREFIX) {
-                if (resources == null) {
-                    throw new IllegalStateException("Resource dictionary is 
undefined.");
-                }
 
                 if (attributeValue.length() > 1) {
                     if (attributeValue.charAt(1) == RESOURCE_KEY_PREFIX) {
                         resolvedValue = attributeValue.substring(1);
+                    } else if (resources == null) {
+                        throw new IllegalStateException("Resource dictionary 
is undefined.");
                     } else {
                         resolvedValue = 
resources.get(attributeValue.substring(1));
                     }

Reply via email to