You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/10/05 19:19:30 UTC

svn commit: r1394665 - /cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java

Author: dkulp
Date: Fri Oct  5 17:19:30 2012
New Revision: 1394665

URL: http://svn.apache.org/viewvc?rev=1394665&view=rev
Log:
Add deprecated methods to maintain compatibility with 2.6.x

Modified:
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java?rev=1394665&r1=1394664&r2=1394665&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java (original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java Fri Oct  5 17:19:30 2012
@@ -77,11 +77,6 @@ public class Claim implements Serializab
         this.values.addAll(values);
     }
 
-    public void setValue(String value) {
-        this.values.clear();
-        this.values.add(value);
-    }
-    
     public void addValue(String s) {
         this.values.add(s);
     }
@@ -90,4 +85,21 @@ public class Claim implements Serializab
         return values;
     }
 
+    @Deprecated
+    public void setValue(String value) {
+        this.values.clear();
+        if (value != null) {
+            this.values.add(value);
+        }
+    }
+    @Deprecated
+    public String getValue() {
+        if (this.values.size() == 0) {
+            return null;
+        } else if (this.values.size() == 1) {
+            return this.values.get(0);
+        }
+        throw new IllegalStateException("Claim has multiple values");
+    }
+
 }