Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 42824 invoked from network); 9 Jun 2010 19:32:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Jun 2010 19:32:49 -0000 Received: (qmail 10203 invoked by uid 500); 9 Jun 2010 19:32:49 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 10176 invoked by uid 500); 9 Jun 2010 19:32:49 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 10169 invoked by uid 99); 9 Jun 2010 19:32:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jun 2010 19:32:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Wed, 09 Jun 2010 19:32:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A54572388994; Wed, 9 Jun 2010 19:32:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r953126 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java Date: Wed, 09 Jun 2010 19:32:04 -0000 To: commits@felix.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100609193204.A54572388994@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rickhall Date: Wed Jun 9 19:32:04 2010 New Revision: 953126 URL: http://svn.apache.org/viewvc?rev=953126&view=rev Log: Make sure case insensitive keys are found before doing dictionary lookup. (FELIX-2401) Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java?rev=953126&r1=953125&r2=953126&view=diff ============================================================================== --- felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java (original) +++ felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java Wed Jun 9 19:32:04 2010 @@ -140,11 +140,19 @@ public class FilterImpl implements Filte Object value = null; if (m_dict != null) { + // If attribute names are case insensitive, then look in + // the case insensitive key map to find the actual case of + // the key. if (m_map != null) { key = (String) m_map.get(name); } - value = m_dict.get(key); + // If the key could not be found in the case insensitive + // key map, then avoid doing the dictionary lookup on it. + if (key != null) + { + value = m_dict.get(key); + } } return (value == null) ? null : new Attribute(key, value, false); } @@ -205,4 +213,4 @@ public class FilterImpl implements Filte throw new UnsupportedOperationException("Not supported yet."); } } -} \ No newline at end of file +}