harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r810948 - in /harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text: DateFormat.java Format.java MessageFormat.java NumberFormat.java
Date Thu, 03 Sep 2009 13:59:04 GMT
Author: tellison
Date: Thu Sep  3 13:59:04 2009
New Revision: 810948

URL: http://svn.apache.org/viewvc?rev=810948&view=rev
Log:
Apply fix for HARMONY-6334 ([classlib] [text] java.text.Format#parseObject(String) does not
behave as expected)

Modified:
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/DateFormat.java
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Format.java
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/NumberFormat.java

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/DateFormat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/DateFormat.java?rev=810948&r1=810947&r2=810948&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/DateFormat.java (original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/DateFormat.java Thu
Sep  3 13:59:04 2009
@@ -649,7 +649,7 @@
     public Date parse(String string) throws ParseException {
         ParsePosition position = new ParsePosition(0);
         Date date = parse(string, position);
-        if (position.getErrorIndex() != -1 || position.getIndex() == 0) {
+        if (position.getIndex() == 0) {
             // text.19=Unparseable date: {0}
             throw new ParseException(
                     Messages.getString("text.19", string), position.getErrorIndex()); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Format.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Format.java?rev=810948&r1=810947&r2=810948&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Format.java (original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Format.java Thu Sep
 3 13:59:04 2009
@@ -185,7 +185,7 @@
     public Object parseObject(String string) throws ParseException {
         ParsePosition position = new ParsePosition(0);
         Object result = parseObject(string, position);
-        if (position.getErrorIndex() != -1 || position.getIndex() == 0) {
+        if (position.getIndex() == 0) {
             // text.1C=Format.parseObject(String) parse failure
             throw new ParseException(
                     Messages.getString("text.1C"), position.getErrorIndex()); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java?rev=810948&r1=810947&r2=810948&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/MessageFormat.java
Thu Sep  3 13:59:04 2009
@@ -857,7 +857,7 @@
     public Object[] parse(String string) throws ParseException {
         ParsePosition position = new ParsePosition(0);
         Object[] result = parse(string, position);
-        if (position.getErrorIndex() != -1 || position.getIndex() == 0) {
+        if (position.getIndex() == 0) {
             // text.1B=MessageFormat.parseObject(String) parse failure
             throw new ParseException(
                     Messages.getString("text.1B"), position.getErrorIndex()); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/NumberFormat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/NumberFormat.java?rev=810948&r1=810947&r2=810948&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/NumberFormat.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/NumberFormat.java
Thu Sep  3 13:59:04 2009
@@ -539,7 +539,7 @@
     public Number parse(String string) throws ParseException {
         ParsePosition pos = new ParsePosition(0);
         Number number = parse(string, pos);
-        if (pos.getErrorIndex() != -1 || pos.getIndex() == 0) {
+        if (pos.getIndex() == 0) {
             // text.1D=Unparseable number: {0}
             throw new ParseException(
                     Messages.getString("text.1D", string), pos.getErrorIndex()); //$NON-NLS-1$



Mime
View raw message