You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by od...@apache.org on 2008/02/11 18:43:50 UTC

svn commit: r620543 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java

Author: odeakin
Date: Mon Feb 11 09:43:31 2008
New Revision: 620543

URL: http://svn.apache.org/viewvc?rev=620543&view=rev
Log:
Fix for HARMONY-4774 ([classlib][luni] java.util.Scanner.nextLine() has a problem on newline).

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?rev=620543&r1=620542&r2=620543&view=diff
==============================================================================
--- 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 Mon Feb 11 09:43:31 2008
@@ -818,11 +818,9 @@
         boolean hasNextLine = false;
         while (true) {
             if (matcher.find()) {
-                if (inputExhausted || matcher.end() != bufferLength) {
-                    matchSuccessful = true;
-                    hasNextLine = true;
-                    break;
-                }
+                matchSuccessful = true;
+                hasNextLine = true;
+                break;
             } else {
                 if (inputExhausted) {
                     matchSuccessful = false;
@@ -1394,12 +1392,10 @@
         String result = null;
         while (true) {
             if (matcher.find()) {
-                if (inputExhausted || matcher.end() != bufferLength) {
-                    matchSuccessful = true;
-                    findStartIndex = matcher.end();
-                    result = matcher.group();
-                    break;
-                }
+                matchSuccessful = true;
+                findStartIndex = matcher.end();
+                result = matcher.group();
+                break;
             } else {
                 if (inputExhausted) {
                     matchSuccessful = false;