Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3EBA992A for ; Mon, 9 Jan 2012 14:47:21 +0000 (UTC) Received: (qmail 79728 invoked by uid 500); 9 Jan 2012 14:47:21 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 75798 invoked by uid 500); 9 Jan 2012 14:47:05 -0000 Mailing-List: contact dev-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 dev@hc.apache.org Received: (qmail 75545 invoked by uid 99); 9 Jan 2012 14:47:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2012 14:47:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2012 14:46:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7DF6113FFB9 for ; Mon, 9 Jan 2012 14:46:39 +0000 (UTC) Date: Mon, 9 Jan 2012 14:46:39 +0000 (UTC) From: "Jon Moore (Resolved) (JIRA)" To: dev@hc.apache.org Message-ID: <1892347270.21673.1326120399517.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2091560635.32146.1324409311146.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (HTTPCLIENT-1152) org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage should verify class of returned object before casting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jon Moore resolved HTTPCLIENT-1152. ----------------------------------- Resolution: Fixed Checked into trunk and backported to 4.1.x. @Clinton - can you review and close this issue if you're satisfied? > org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage should verify class of returned object before casting > --------------------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1152 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1152 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: Cache, HttpClient > Affects Versions: 4.1.1 > Reporter: Clinton Nielsen > Assignee: Jon Moore > Priority: Minor > Fix For: 4.1.3, 4.2 Alpha2 > > Attachments: HTTPCLIENT-1152.patch > > > org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage > Original (in getEntry function): > byte[] data = (byte[]) client.get(url); > Should be: > Object obj= client.get(url); > if (null == obj || !(objinstanceof byte[])) { > return null; > } > byte[] data = (byte[])obj; > Original (in updateEntry function): > byte[] oldBytes = (v != null) ? (byte[]) v.getValue() : null; > Should be: > byte[] oldBytes = (v != null && (v.getValue() instanceof byte[])) ? (byte[]) v.getValue() : null; > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org