[kaffe] CVS kaffe (guilhem): SimpleDateFormat.formatWithAttribute fix when not setting attributes.
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Mon Aug 25 22:41:02 2003
PatchSet 3980
Date: 2003/08/26 05:38:49
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
SimpleDateFormat.formatWithAttribute fix when not setting attributes.
Members:
ChangeLog:1.1577->1.1578
libraries/javalib/java/text/SimpleDateFormat.java:1.23->1.24
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1577 kaffe/ChangeLog:1.1578
--- kaffe/ChangeLog:1.1577 Mon Aug 25 19:14:33 2003
+++ kaffe/ChangeLog Tue Aug 26 05:38:49 2003
@@ -1,3 +1,9 @@
+2003-08-26 Guilhem Lavaux <guilhem@kaffe.org>
+
+ * libraries/javalib/java/text/SimpleDateFormat.java:
+ (formatWithAttribute) Added a if branch condition when we are not
+ setting attributes for an iterator.
+
2003-08-25 Mark Wielaard <mark@klomp.org>
* include/jni_cpp.h (JNIEnv::CheckException): Change to
Index: kaffe/libraries/javalib/java/text/SimpleDateFormat.java
diff -u kaffe/libraries/javalib/java/text/SimpleDateFormat.java:1.23 kaffe/libraries/javalib/java/text/SimpleDateFormat.java:1.24
--- kaffe/libraries/javalib/java/text/SimpleDateFormat.java:1.23 Mon Aug 25 06:14:48 2003
+++ kaffe/libraries/javalib/java/text/SimpleDateFormat.java Tue Aug 26 05:38:50 2003
@@ -538,9 +538,12 @@
ranges.add(new Integer(buffer.length()));
}
} else {
- attributes.add(null);
buffer.append(o.toString());
- ranges.add(new Integer(buffer.length()));
+ if (attributes != null)
+ {
+ attributes.add(null);
+ ranges.add(new Integer(buffer.length()));
+ }
}
}
return buffer;