You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2010/06/09 21:32:04 UTC
svn commit: r953126 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java
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
+}