Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49BA6B4A4 for ; Thu, 12 Jan 2012 13:19:35 +0000 (UTC) Received: (qmail 11205 invoked by uid 500); 12 Jan 2012 13:19:33 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 9844 invoked by uid 500); 12 Jan 2012 13:19:26 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 9743 invoked by uid 99); 12 Jan 2012 13:19:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 13:19:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 13:19:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3647F23889BB for ; Thu, 12 Jan 2012 13:19:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120112131903.3647F23889BB@eris.apache.org> 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 + * . + * + */ +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