harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r488661 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java
Date Tue, 19 Dec 2006 12:41:58 GMT
Author: tellison
Date: Tue Dec 19 04:41:58 2006
New Revision: 488661

URL: http://svn.apache.org/viewvc?view=rev&rev=488661
Log:
Remove redundant null check as per HARMONY-2383 ([classlib] [luni] Fixes for some minor issues
in the java.util package found by Melody)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java?view=diff&rev=488661&r1=488660&r2=488661
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java Tue
Dec 19 04:41:58 2006
@@ -2282,9 +2282,7 @@
         int oldLimit = buffer.limit();
         int newCapacity = oldCapacity * DIPLOID;
         char[] newBuffer = new char[newCapacity];
-        if (buffer != null) {
-            System.arraycopy(buffer.array(), 0, newBuffer, 0, oldLimit);
-        }
+        System.arraycopy(buffer.array(), 0, newBuffer, 0, oldLimit);
         buffer = CharBuffer.wrap(newBuffer, 0, newCapacity);
         buffer.position(oldPosition);
         buffer.limit(oldLimit);



Mime
View raw message