harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r620543 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java
Date Mon, 11 Feb 2008 17:43:50 GMT
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;



Mime
View raw message