hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r360538 - in /jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http: executor/HttpExecutionContext.java protocol/HttpContext.java
Date Sun, 01 Jan 2006 20:20:18 GMT
Author: olegk
Date: Sun Jan  1 12:20:06 2006
New Revision: 360538

URL: http://svn.apache.org/viewcvs?rev=360538&view=rev
Log:
Added HttpContext#removeAttribute method

Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/executor/HttpExecutionContext.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/protocol/HttpContext.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/executor/HttpExecutionContext.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/executor/HttpExecutionContext.java?rev=360538&r1=360537&r2=360538&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/executor/HttpExecutionContext.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/executor/HttpExecutionContext.java
Sun Jan  1 12:20:06 2006
@@ -81,4 +81,15 @@
         this.map.put(id, obj);
     }
     
+    public Object removeAttribute(final String id) {
+        if (id == null) {
+            throw new IllegalArgumentException("Id may not be null");
+        }
+        if (this.map != null) {
+            return this.map.remove(id);
+        } else {
+            return null;
+        }
+    }
+
 }

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/protocol/HttpContext.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/protocol/HttpContext.java?rev=360538&r1=360537&r2=360538&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/protocol/HttpContext.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/protocol/HttpContext.java
Sun Jan  1 12:20:06 2006
@@ -47,5 +47,7 @@
     Object getAttribute(String id);
 
     void setAttribute(String id, Object obj);
+
+    Object removeAttribute(String id);
     
 }



Mime
View raw message