hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1230515 - in /httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached: MemcachedHttpCacheStorage.java MemcachedOperationTimeoutException.java
Date Thu, 12 Jan 2012 13:19:03 GMT
Author: olegk
Date: Thu Jan 12 13:19:02 2012
New Revision: 1230515

URL: http://svn.apache.org/viewvc?rev=1230515&view=rev
Log:
Fixed Java 1.5 compatibility issue

Added:
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java
  (with props)
Modified:
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java?rev=1230515&r1=1230514&r2=1230515&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
Thu Jan 12 13:19:02 2012
@@ -128,7 +128,7 @@ public class MemcachedHttpCacheStorage i
         try {
             client.set(url, 0, bos.toByteArray());
         } catch (OperationTimeoutException ex) {
-            throw new IOException(ex);
+            throw new MemcachedOperationTimeoutException(ex);
         }
     }
 
@@ -152,7 +152,7 @@ public class MemcachedHttpCacheStorage i
         try {
             return reconstituteEntry(client.get(url));
         } catch (OperationTimeoutException ex) {
-            throw new IOException(ex);
+            throw new MemcachedOperationTimeoutException(ex);
         }
     }
 
@@ -160,7 +160,7 @@ public class MemcachedHttpCacheStorage i
         try {
             client.delete(url);
         } catch (OperationTimeoutException ex) {
-            throw new IOException(ex);
+            throw new MemcachedOperationTimeoutException(ex);
         }
     }
 
@@ -188,7 +188,7 @@ public class MemcachedHttpCacheStorage i
                     } else return;
                 }
             } catch (OperationTimeoutException ex) {
-                throw new IOException(ex);
+                throw new MemcachedOperationTimeoutException(ex);
             }
         } while (numRetries <= maxUpdateRetries);
 

Added: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java?rev=1230515&view=auto
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java
(added)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java
Thu Jan 12 13:19:02 2012
@@ -0,0 +1,40 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+package org.apache.http.impl.client.cache.memcached;
+
+import java.io.IOException;
+
+class MemcachedOperationTimeoutException extends IOException {
+
+    private static final long serialVersionUID = 1608334789051537010L;
+
+    public MemcachedOperationTimeoutException(final Throwable cause) {
+        super(cause.getMessage());
+        initCause(cause);
+    }
+
+}

Propchange: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedOperationTimeoutException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message