You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ma...@apache.org on 2009/05/22 14:29:02 UTC
svn commit: r777496 -
/lucene/solr/trunk/src/java/org/apache/solr/schema/FieldProperties.java
Author: markrmiller
Date: Fri May 22 12:29:02 2009
New Revision: 777496
URL: http://svn.apache.org/viewvc?rev=777496&view=rev
Log:
using the entryset rather than keyset is faster
Modified:
lucene/solr/trunk/src/java/org/apache/solr/schema/FieldProperties.java
Modified: lucene/solr/trunk/src/java/org/apache/solr/schema/FieldProperties.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/schema/FieldProperties.java?rev=777496&r1=777495&r2=777496&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/schema/FieldProperties.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/schema/FieldProperties.java Fri May 22 12:29:02 2009
@@ -135,11 +135,11 @@
static int parseProperties(Map<String,String> properties, boolean which) {
int props = 0;
- for (String prop : properties.keySet()) {
- if (propertyMap.get(prop)==null) continue;
- String val = properties.get(prop);
+ for (Map.Entry<String, String> entry : properties.entrySet()) {
+ String val = entry.getValue();
+ if(val == null) continue;
if (Boolean.parseBoolean(val) == which) {
- props |= propertyNameToInt(prop);
+ props |= propertyNameToInt(entry.getKey());
}
}
return props;