jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r598928 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
Date Wed, 28 Nov 2007 09:38:09 GMT
Author: mreutegg
Date: Wed Nov 28 01:38:08 2007
New Revision: 598928

URL: http://svn.apache.org/viewvc?rev=598928&view=rev
Log:
JCR-1241: NodeIndexer creates unnecessary string representation of Name value

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java?rev=598928&r1=598927&r2=598928&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
Wed Nov 28 01:38:08 2007
@@ -622,15 +622,14 @@
      * @param internalValue The value for the field to add to the document.
      */
     protected void addNameValue(Document doc, String fieldName, Object internalValue) {
-        Name qualiName = (Name) internalValue;
-        String normValue = qualiName.toString();
         try {
-            normValue = mappings.getPrefix(qualiName.getNamespaceURI())
+            Name qualiName = (Name) internalValue;
+            String normValue = mappings.getPrefix(qualiName.getNamespaceURI())
                     + ":" + qualiName.getLocalName();
+            doc.add(createFieldWithoutNorms(fieldName, normValue, false));
         } catch (NamespaceException e) {
             // will never happen
         }
-        doc.add(createFieldWithoutNorms(fieldName, normValue, false));
     }
 
     /**



Mime
View raw message