Author: dkulp
Date: Thu Jan  5 20:46:10 2012
New Revision: 1227823

URL: http://svn.apache.org/viewvc?rev=1227823&view=rev
Log:
[CXF-3989] Recorded scopes are "mapped" keys, make sure we map the key
when setting and getting the scope

Modified:
    
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java

Modified: 
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java?rev=1227823&r1=1227822&r2=1227823&view=diff
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
 (original)
+++ 
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
 Thu Jan  5 20:46:10 2012
@@ -484,19 +484,20 @@ public class WrappedMessageContext imple
     }
 
     public final void setScope(String key, Scope arg1) {
-        if (!this.containsKey(key) && !scopes.containsKey(key)) {
+        String mappedKey = mapKey(key);
+        if (!this.containsKey(mappedKey) && !scopes.containsKey(mappedKey)) {
             throw new IllegalArgumentException("non-existant property-" + key 
+ "is specified");    
         }
-        scopes.put(key, arg1);        
+        scopes.put(mappedKey, arg1);        
     }
 
     public final Scope getScope(String key) {
-        if (containsKey(key)) {
-            if (scopes.containsKey(key)) {
-                return scopes.get(key);
-            } else {
-                return defaultScope;
-            }
+        String mappedKey = mapKey(key);
+        if (scopes.containsKey(mappedKey)) {
+            return scopes.get(mappedKey);
+        }
+        if (containsKey(mappedKey)) {
+            return defaultScope;
         }
         throw new IllegalArgumentException("non-existant property-" + key + 
"is specified");
     }


Reply via email to