This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: several fixes from GNU classpath
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Tue, 20 Apr 2004 18:14:56 +0200
- Subject: Patch: several fixes from GNU classpath
Hi list,
I just commited the attached patch with several fixes from GNU
classpath.
Michael
2004-04-20 Jeroen Frijters <jeroen@frijters.net>
* java/text/DecimalFormat.java (scanFix): Removed suffix check
for percent and permill check.
2004-04-20 Guilhem Lavaux <guilhem@kaffe.org>
* java/text/FieldPosition.java
(FieldPosition) Constructor now behaves as it should according
to the java documentation.
2004-04-20 Mark Wielaard <mark@klomp.org>
* java/util/Properties.java: Use the word umlaut, not ä in api
documentation.
Index: java/text/DecimalFormat.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/DecimalFormat.java,v
retrieving revision 1.14
diff -u -r1.14 DecimalFormat.java
--- java/text/DecimalFormat.java 19 Nov 2003 12:06:38 -0000 1.14
+++ java/text/DecimalFormat.java 20 Apr 2004 16:13:57 -0000
@@ -90,7 +90,7 @@
else
buf.append(syms.getCurrencySymbol());
}
- else if (is_suffix && c == syms.getPercent())
+ else if (c == syms.getPercent())
{
if (multiplierSet)
throw new IllegalArgumentException ("multiplier already set " +
@@ -99,7 +99,7 @@
multiplier = 100;
buf.append(c);
}
- else if (is_suffix && c == syms.getPerMill())
+ else if (c == syms.getPerMill())
{
if (multiplierSet)
throw new IllegalArgumentException ("multiplier already set " +
Index: java/text/FieldPosition.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/FieldPosition.java,v
retrieving revision 1.7
diff -u -r1.7 FieldPosition.java
--- java/text/FieldPosition.java 2 Dec 2003 15:56:52 -0000 1.7
+++ java/text/FieldPosition.java 20 Apr 2004 16:13:57 -0000
@@ -72,13 +72,13 @@
/**
* This method initializes a new instance of <code>FieldPosition</code>
* to have the specified field attribute. The attribute will be used as
- * an id.
+ * an id. It is formally equivalent to calling FieldPosition(field, -1).
*
* @param field The field format attribute.
*/
public FieldPosition (Format.Field field)
{
- this.field_attribute = field;
+ this(field, -1);
}
/**
Index: java/util/Properties.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/Properties.java,v
retrieving revision 1.18
diff -u -r1.18 Properties.java
--- java/util/Properties.java 26 Aug 2003 22:42:36 -0000 1.18
+++ java/util/Properties.java 20 Apr 2004 16:13:58 -0000
@@ -188,17 +188,14 @@
{
char c = 0;
int pos = 0;
- // If empty line or begins with a comment character, skip this line.
- if (line.length() == 0
- || line.charAt(0) == '#' || line.charAt(0) == '!')
- continue;
-
+ // Leading whitespaces must be deleted first.
while (pos < line.length()
&& Character.isWhitespace(c = line.charAt(pos)))
pos++;
- // If line is empty skip this line.
- if (pos == line.length())
+ // If empty line or begins with a comment character, skip this line.
+ if (line.length() == 0
+ || line.charAt(0) == '#' || line.charAt(0) == '!')
continue;
// The characters up to the next Whitespace, ':', or '='