lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1591116 [3/3] - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/codecs/ lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/ lucene/core/ lucene/core/src/java/org/apache/lucene/analysis/ lucene/core/src/java/org/apache/lucene/c...
Date Tue, 29 Apr 2014 21:46:54 GMT
Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/JsonPreAnalyzedParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/JsonPreAnalyzedParser.java?rev=1591116&r1=1591115&r2=1591116&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/JsonPreAnalyzedParser.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/JsonPreAnalyzedParser.java
Tue Apr 29 21:46:51 2014
@@ -230,10 +230,10 @@ public class JsonPreAnalyzedParser imple
         Map<String,Object> tok = new TreeMap<>();
         while (it.hasNext()) {
           Class<? extends Attribute> cl = it.next();
-          if (!ts.hasAttribute(cl)) {
+          Attribute att = ts.getAttribute(cl);
+          if (att == null) {
             continue;
           }
-          Attribute att = ts.getAttribute(cl);
           if (cl.isAssignableFrom(CharTermAttribute.class)) {
             CharTermAttribute catt = (CharTermAttribute)att;
             cTerm = new String(catt.buffer(), 0, catt.length());

Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/SimplePreAnalyzedParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/SimplePreAnalyzedParser.java?rev=1591116&r1=1591115&r2=1591116&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/SimplePreAnalyzedParser.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/schema/SimplePreAnalyzedParser.java
Tue Apr 29 21:46:51 2014
@@ -482,10 +482,10 @@ public final class SimplePreAnalyzedPars
         String tTerm = null;
         while (it.hasNext()) {
           Class<? extends Attribute> cl = it.next();
-          if (!ts.hasAttribute(cl)) {
+          Attribute att = ts.getAttribute(cl);
+          if (att == null) {
             continue;
           }
-          Attribute att = ts.getAttribute(cl);
           if (cl.isAssignableFrom(CharTermAttribute.class)) {
             CharTermAttribute catt = (CharTermAttribute)att;
             cTerm = escape(catt.buffer(), catt.length());



Mime
View raw message