lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r920241 - /lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/BytesRef.java
Date Mon, 08 Mar 2010 09:21:06 GMT
Author: uschindler
Date: Mon Mar  8 09:21:05 2010
New Revision: 920241

URL: http://svn.apache.org/viewvc?rev=920241&view=rev
Log:
add a nocommit

Modified:
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/BytesRef.java

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/BytesRef.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/BytesRef.java?rev=920241&r1=920240&r2=920241&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/BytesRef.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/BytesRef.java Mon Mar 
8 09:21:05 2010
@@ -70,6 +70,9 @@
   public void copy(CharSequence text) {
     // nocommit -- remove this paranoia
     assert UnicodeUtil.validUTF16String(text);
+    // nocommit -- new byte[10] is waste of resources,
+    // it should simply allocate text.length()*4 like UnicodeUtil.
+    // Ideally, I would remove this here and add a null-check in UnicodeUtil. (Uwe)
     if (bytes == null)
       bytes = new byte[10];
     UnicodeUtil.UTF16toUTF8(text, 0, text.length(), this);



Mime
View raw message