[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath: various small fixes

Kaffe CVS cvs-commits at kaffe.org
Mon May 17 07:09:02 PDT 2004


PatchSet 4737 
Date: 2004/05/17 13:54:58
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: various small fixes

2004-05-17  Dalibor Topic  <robilad at kaffe.org>

* libraries/javalib/java/beans/Introspector.java,
        libraries/javalib/java/beans/PropertyEditor.java,
        libraries/javalib/java/beans/PropertyEditorManager.java,
        libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java,
        libraries/javalib/java/lang/Throwable.java,
        libraries/javalib/java/security/SignedObject.java,
        libraries/javalib/java/security/UnresolvedPermission.java,
        libraries/javalib/java/text/AttributedString.java,
        libraries/javalib/java/util/Calendar.java,
        libraries/javalib/java/util/Date.java,
        libraries/javalib/java/util/HashMap.java,
        libraries/javalib/java/util/logging/Level.java,
        libraries/javalib/java/util/zip/GZIPOutputStream.java:
Resynced with GNU Classpath.

2004-04-23  Tom Tromey  <tromey at redhat.com>

* java/security/UnresolvedPermission.java: Cleaned up imports.
* java/util/Date.java (parse): Removed unused variable.

2004-04-17  Michael Koch  <konqueror at gmx.de>

* java/security/SignedObject.java:
Fixed HTML tags in javadoc comments all over.

2004-04-17  Michael Koch  <konqueror at gmx.de>

* java/beans/Introspector.java,
java/beans/PropertyEditor.java,
java/beans/PropertyEditorManager.java,
java/beans/beancontext/BeanContextServiceProvider.java:
Fixed HTML tags in javadocs.

2004-04-29  Mark Wielaard  <mark at klomp.org>

Reported by f.haeglsperger at gmx.de [patch #2485]
* java/util/HashMap.java (rehash): Add entry at start of bucket.

2004-05-07  Jerry Quinn  <jlquinn at optonline.net>

* java/util/Calendar.java (getActualMinimum,
getActualMaximum):  Remove abstract.  Implement.

2004-05-06  Michael Koch  <konqueror at gmx.de>

* java/util/logging/Level.java:
Explicitly import java.io.Serializable.

2004-05-05  Michael Koch  <konqueror at gmx.de>

* java/util/zip/GZIPOutputStream.java
(GZIPOutputStream): Initialize crc.

2004-04-29  Tom Tromey  <tromey at redhat.com>

* java/text/AttributedString.java: Cleaned up imports.

2004-04-17  Michael Koch  <konqueror at gmx.de>

* java/lang/CharSequence.java
(subSequence): Fixed <code> tag in javadoc.

2004-04-30  Grzegorz B. Prokopski <gadek at debian.org>

* java/lang/Throwable.java (nl): Remove static field.
(StaticData): New private static inner class.
(stackTraceStringBuffer): Use StaticData.nl.

Members: 
	ChangeLog:1.2311->1.2312 
	libraries/javalib/java/beans/Introspector.java:1.17->1.18 
	libraries/javalib/java/beans/PropertyEditor.java:1.4->1.5 
	libraries/javalib/java/beans/PropertyEditorManager.java:1.5->1.6 
	libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java:1.2->1.3 
	libraries/javalib/java/lang/Throwable.java:1.11->1.12 
	libraries/javalib/java/security/SignedObject.java:1.2->1.3 
	libraries/javalib/java/security/UnresolvedPermission.java:1.2->1.3 
	libraries/javalib/java/text/AttributedString.java:1.6->1.7 
	libraries/javalib/java/util/Calendar.java:1.19->1.20 
	libraries/javalib/java/util/Date.java:1.21->1.22 
	libraries/javalib/java/util/HashMap.java:1.22->1.23 
	libraries/javalib/java/util/logging/Level.java:1.2->1.3 
	libraries/javalib/java/util/zip/GZIPOutputStream.java:1.6->1.7 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2311 kaffe/ChangeLog:1.2312
--- kaffe/ChangeLog:1.2311	Sun May 16 16:45:14 2004
+++ kaffe/ChangeLog	Mon May 17 13:54:58 2004
@@ -1,3 +1,73 @@
+2004-05-17  Dalibor Topic  <robilad at kaffe.org>
+
+	* libraries/javalib/java/beans/Introspector.java,
+        libraries/javalib/java/beans/PropertyEditor.java,
+        libraries/javalib/java/beans/PropertyEditorManager.java,
+        libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java,
+        libraries/javalib/java/lang/Throwable.java,
+        libraries/javalib/java/security/SignedObject.java,
+        libraries/javalib/java/security/UnresolvedPermission.java,
+        libraries/javalib/java/text/AttributedString.java,
+        libraries/javalib/java/util/Calendar.java,
+        libraries/javalib/java/util/Date.java,
+        libraries/javalib/java/util/HashMap.java,
+        libraries/javalib/java/util/logging/Level.java,
+        libraries/javalib/java/util/zip/GZIPOutputStream.java:
+	Resynced with GNU Classpath.
+
+	2004-04-23  Tom Tromey  <tromey at redhat.com>
+
+	* java/security/UnresolvedPermission.java: Cleaned up imports.
+	* java/util/Date.java (parse): Removed unused variable.
+	
+	2004-04-17  Michael Koch  <konqueror at gmx.de>
+
+	* java/security/SignedObject.java:
+	Fixed HTML tags in javadoc comments all over.
+
+	2004-04-17  Michael Koch  <konqueror at gmx.de>
+
+	* java/beans/Introspector.java,
+	java/beans/PropertyEditor.java,
+	java/beans/PropertyEditorManager.java,
+	java/beans/beancontext/BeanContextServiceProvider.java:
+	Fixed HTML tags in javadocs.
+
+	2004-04-29  Mark Wielaard  <mark at klomp.org>
+
+	Reported by f.haeglsperger at gmx.de [patch #2485]
+	* java/util/HashMap.java (rehash): Add entry at start of bucket.
+
+	2004-05-07  Jerry Quinn  <jlquinn at optonline.net>
+
+	* java/util/Calendar.java (getActualMinimum,
+	getActualMaximum):  Remove abstract.  Implement.
+
+	2004-05-06  Michael Koch  <konqueror at gmx.de>
+
+	* java/util/logging/Level.java:
+	Explicitly import java.io.Serializable.
+
+	2004-05-05  Michael Koch  <konqueror at gmx.de>
+
+	* java/util/zip/GZIPOutputStream.java
+	(GZIPOutputStream): Initialize crc.
+
+	2004-04-29  Tom Tromey  <tromey at redhat.com>
+
+	* java/text/AttributedString.java: Cleaned up imports.
+
+	2004-04-17  Michael Koch  <konqueror at gmx.de>
+
+	* java/lang/CharSequence.java
+	(subSequence): Fixed <code> tag in javadoc.
+
+	2004-04-30  Grzegorz B. Prokopski <gadek at debian.org>
+
+	* java/lang/Throwable.java (nl): Remove static field.
+	(StaticData): New private static inner class.
+	(stackTraceStringBuffer): Use StaticData.nl.
+
 2004-05-16  Guilhem Lavaux <guilhem at kaffe.org>
 
 	* libraries/javalib/java/text/CollationElementIterator.java
Index: kaffe/libraries/javalib/java/beans/Introspector.java
diff -u kaffe/libraries/javalib/java/beans/Introspector.java:1.17 kaffe/libraries/javalib/java/beans/Introspector.java:1.18
--- kaffe/libraries/javalib/java/beans/Introspector.java:1.17	Mon Mar 22 11:24:42 2004
+++ kaffe/libraries/javalib/java/beans/Introspector.java	Mon May 17 13:55:02 2004
@@ -66,7 +66,7 @@
  * When you call getBeanInfo(class c), the Introspector
  * first searches for BeanInfo class to see if you
  * provided any explicit information.  It searches for a
- * class named <bean class name>BeanInfo in different
+ * class named &lt;bean class name&gt;BeanInfo in different
  * packages, first searching the bean class's package
  * and then moving on to search the beanInfoSearchPath.<P>
  *
@@ -114,14 +114,14 @@
  *     type &lt;type&gt;.  There may also be a
  *     <CODE>public &lt;type&gt;[] getXXX()</CODE> and a
  *     <CODE>public void setXXX(&lt;type&gt;)</CODE>
- *     method as well.</CODE></LI>
+ *     method as well.</LI>
  * <LI>If there is a
  *     <CODE>public void setXXX(int,&lt;type&gt;)</CODE>
  *     method, then it is a write-only indexed property of
  *     type &lt;type&gt;.  There may also be a
  *     <CODE>public &lt;type&gt;[] getXXX()</CODE> and a
  *     <CODE>public void setXXX(&lt;type&gt;)</CODE>
- *     method as well.</CODE></LI>
+ *     method as well.</LI>
  * <LI>If there is a
  *     <CODE>public &lt;type&gt; getXXX()</CODE> method,
  *     then XXX is a read-only property of type
Index: kaffe/libraries/javalib/java/beans/PropertyEditor.java
diff -u kaffe/libraries/javalib/java/beans/PropertyEditor.java:1.4 kaffe/libraries/javalib/java/beans/PropertyEditor.java:1.5
--- kaffe/libraries/javalib/java/beans/PropertyEditor.java:1.4	Wed Oct 22 10:34:52 2003
+++ kaffe/libraries/javalib/java/beans/PropertyEditor.java	Mon May 17 13:55:02 2004
@@ -77,7 +77,7 @@
  **       have isPaintable() return true and implement the paintValue() method.
  **       This method does not determine in any way how the value is edited;
  **       merely how it is displayed.</LI>
- **   <LU>Let the caller of the PropertyEditor give the user a text input.  Do
+ **   <LI>Let the caller of the PropertyEditor give the user a text input.  Do
  **       this by returning a non-null String from getAsText().  If you support
  **       text input, you *must* support setAsText().</LI>
  **   <LI>Give the caller a set of possible values, such as "true"/"false", that
Index: kaffe/libraries/javalib/java/beans/PropertyEditorManager.java
diff -u kaffe/libraries/javalib/java/beans/PropertyEditorManager.java:1.5 kaffe/libraries/javalib/java/beans/PropertyEditorManager.java:1.6
--- kaffe/libraries/javalib/java/beans/PropertyEditorManager.java:1.5	Mon Mar 22 11:24:42 2004
+++ kaffe/libraries/javalib/java/beans/PropertyEditorManager.java	Mon May 17 13:55:02 2004
@@ -61,19 +61,20 @@
  * already registered; if it is, that property editor is
  * used.  Next it takes the type's classname and appends
  * "Editor" to it, and searches first in the class's
- * package and then in the property editor search path.<P>
+ * package and then in the property editor search path.
  *
- * Default property editors are provided for:<P>
- * <OL>
- * <LI>boolean, byte, short, int, long, float, and double</LI>
- * <LI>java.lang.String</LI>
- * <LI>java.awt.Color</LI>
- * <LI>java.awt.Font</LI>
- * <OL>
+ * <p>Default property editors are provided for:</p>
+ * 
+ * <ol>
+ * <li>boolean, byte, short, int, long, float, and double</li>
+ * <li>java.lang.String</li>
+ * <li>java.awt.Color</li>
+ * <li>java.awt.Font</li>
+ * </ol>
  *
- * <STRONG>Spec Suggestion:</STRONG> Perhaps an editor for
+ * <p><strong>Spec Suggestion:</strong> Perhaps an editor for
  * Filename or something like it should be provided.  As well
- * as char.
+ * as char.</p>
  *
  * @author John Keiser
  * @since 1.1
Index: kaffe/libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java
diff -u kaffe/libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java:1.2 kaffe/libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java:1.3
--- kaffe/libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java:1.2	Wed Oct 22 10:34:53 2003
+++ kaffe/libraries/javalib/java/beans/beancontext/BeanContextServiceProvider.java	Mon May 17 13:55:03 2004
@@ -62,14 +62,12 @@
 public interface BeanContextServiceProvider {
 	/**
 	 * Get a service.
-	 * Called from <code>BeanContextServices.getService().
-	 * <P>
+	 * Called from <code>BeanContextServices.getService()</code>.
 	 *
-	 * If the requested service class is not available, or if this
+	 * <p>If the requested service class is not available, or if this
 	 * <code>BeanContextServiceProvider</code> chooses not honor the
 	 * request for some reason, then this method will return
-	 * <code>null</code>.
-	 * <P>
+	 * <code>null</code>.</p>
 	 *
 	 * This method may throw unchecked exceptions, so watch out.
 	 *
Index: kaffe/libraries/javalib/java/lang/Throwable.java
diff -u kaffe/libraries/javalib/java/lang/Throwable.java:1.11 kaffe/libraries/javalib/java/lang/Throwable.java:1.12
--- kaffe/libraries/javalib/java/lang/Throwable.java:1.11	Mon Mar 22 11:24:47 2004
+++ kaffe/libraries/javalib/java/lang/Throwable.java	Mon May 17 13:55:03 2004
@@ -1,5 +1,5 @@
 /* java.lang.Throwable -- Root class for all Exceptions and Errors
-   Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2002, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -388,7 +388,7 @@
    * then a line starting with three spaces and the string "... X more" is
    * printed, where X is the number of remaining stackframes.
    *
-   * @param w the PrintWriter to write the trace to
+   * @param pw the PrintWriter to write the trace to
    * @since 1.1
    */
   public void printStackTrace (PrintWriter pw)
@@ -396,7 +396,20 @@
     pw.print(stackTraceString());
   }
 
-  private static final String nl = System.getProperty("line.separator");
+  /*
+   * We use inner class to avoid a static initializer in this basic class.
+   */
+  private static class StaticData
+  {
+
+    private final static String nl;
+
+    static
+    {
+      nl = System.getProperty("line.separator");
+    }
+  }
+
   // Create whole stack trace in a stringbuffer so we don't have to print
   // it line by line. This prevents printing multiple stack traces from
   // different threads to get mixed up when written to the same PrintWriter.
@@ -449,6 +462,7 @@
   private static void stackTraceStringBuffer(StringBuffer sb, String name,
 					StackTraceElement[] stack, int equal)
   {
+    String nl = StaticData.nl;
     // (finish) first line
     sb.append(name);
     sb.append(nl);
Index: kaffe/libraries/javalib/java/security/SignedObject.java
diff -u kaffe/libraries/javalib/java/security/SignedObject.java:1.2 kaffe/libraries/javalib/java/security/SignedObject.java:1.3
--- kaffe/libraries/javalib/java/security/SignedObject.java:1.2	Wed May 14 23:20:09 2003
+++ kaffe/libraries/javalib/java/security/SignedObject.java	Mon May 17 13:55:04 2004
@@ -98,7 +98,7 @@
  * <p>The signature algorithm can be, among others, the NIST standard <i>DSS</i>,
  * using <i>DSA</i> and <i>SHA-1</i>. The algorithm is specified using the same
  * convention as that for signatures. The <i>DSA</i> algorithm using the
- * </i>SHA-1</i> message digest algorithm can be specified, for example, as
+ * <i>SHA-1</i> message digest algorithm can be specified, for example, as
  * <code>"SHA/DSA"</code> or <code>"SHA-1/DSA"</code> (they are equivalent). In
  * the case of <i>RSA</i>, there are multiple choices for the message digest
  * algorithm, so the signing algorithm could be specified as, for example,
Index: kaffe/libraries/javalib/java/security/UnresolvedPermission.java
diff -u kaffe/libraries/javalib/java/security/UnresolvedPermission.java:1.2 kaffe/libraries/javalib/java/security/UnresolvedPermission.java:1.3
--- kaffe/libraries/javalib/java/security/UnresolvedPermission.java:1.2	Mon Mar 22 11:24:59 2004
+++ kaffe/libraries/javalib/java/security/UnresolvedPermission.java	Mon May 17 13:55:05 2004
@@ -37,6 +37,8 @@
 
 package java.security;
 
+// All uses of Certificate in this file refer to the one in the listed
+// package, not this one.
 import java.security.cert.Certificate;
 import java.util.Arrays;
 import java.util.Enumeration;
Index: kaffe/libraries/javalib/java/text/AttributedString.java
diff -u kaffe/libraries/javalib/java/text/AttributedString.java:1.6 kaffe/libraries/javalib/java/text/AttributedString.java:1.7
--- kaffe/libraries/javalib/java/text/AttributedString.java:1.6	Fri Apr 23 17:35:12 2004
+++ kaffe/libraries/javalib/java/text/AttributedString.java	Mon May 17 13:55:05 2004
@@ -40,7 +40,6 @@
 
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
Index: kaffe/libraries/javalib/java/util/Calendar.java
diff -u kaffe/libraries/javalib/java/util/Calendar.java:1.19 kaffe/libraries/javalib/java/util/Calendar.java:1.20
--- kaffe/libraries/javalib/java/util/Calendar.java:1.19	Thu Apr 22 11:40:44 2004
+++ kaffe/libraries/javalib/java/util/Calendar.java	Mon May 17 13:55:06 2004
@@ -926,8 +926,21 @@
    * @return the actual minimum value.
    * @since jdk1.2
    */
-  // FIXME: XXX: Not abstract in JDK 1.2.
-  public abstract int getActualMinimum(int field);
+  public int getActualMinimum(int field)
+  {
+    Calendar tmp = (Calendar)clone();	// To avoid restoring state
+    int min = tmp.getGreatestMinimum(field);
+    int end = tmp.getMinimum(field);
+    tmp.set(field, min);
+    for (; min > end; min--)
+      {
+	tmp.add(field, -1);	// Try to get smaller
+	if (tmp.get(field) != min - 1)
+	  break;		// Done if not successful
+
+      }
+    return min;
+  }
 
   /**
    * Gets the actual maximum value that is allowed for the specified field.
@@ -936,8 +949,20 @@
    * @return the actual maximum value.  
    * @since jdk1.2
    */
-  // FIXME: XXX: Not abstract in JDK 1.2.
-  public abstract int getActualMaximum(int field);
+  public int getActualMaximum(int field)
+  {
+    Calendar tmp = (Calendar)clone();	// To avoid restoring state
+    int max = tmp.getLeastMaximum(field);
+    int end = tmp.getMaximum(field);
+    tmp.set(field, max);
+    for (; max < end; max++)
+      {
+	tmp.add(field, 1);
+	if (tmp.get(field) != max + 1)
+	  break;
+      }
+    return max;
+  }
 
   /**
    * Return a clone of this object.
Index: kaffe/libraries/javalib/java/util/Date.java
diff -u kaffe/libraries/javalib/java/util/Date.java:1.21 kaffe/libraries/javalib/java/util/Date.java:1.22
--- kaffe/libraries/javalib/java/util/Date.java:1.21	Fri Jan  9 18:14:08 2004
+++ kaffe/libraries/javalib/java/util/Date.java	Mon May 17 13:55:06 2004
@@ -460,7 +460,6 @@
 			int curYear = 1900 + new Date().getYear();
 			int firstYear = curYear - 80;
 			year = firstYear / 100 * 100 + num;
-			int yx = year;
 			if (year < firstYear)
 			  year += 100;
 		      }
Index: kaffe/libraries/javalib/java/util/HashMap.java
diff -u kaffe/libraries/javalib/java/util/HashMap.java:1.22 kaffe/libraries/javalib/java/util/HashMap.java:1.23
--- kaffe/libraries/javalib/java/util/HashMap.java:1.22	Thu Apr 22 11:40:44 2004
+++ kaffe/libraries/javalib/java/util/HashMap.java	Mon May 17 13:55:06 2004
@@ -743,18 +743,9 @@
           {
             int idx = hash(e.key);
             HashEntry dest = buckets[idx];
-
-            if (dest != null)
-              {
-                while (dest.next != null)
-                  dest = dest.next;
-                dest.next = e;
-              }
-            else
-              buckets[idx] = e;
-
             HashEntry next = e.next;
-            e.next = null;
+            e.next = buckets[idx];
+            buckets[idx] = e;
             e = next;
           }
       }
Index: kaffe/libraries/javalib/java/util/logging/Level.java
diff -u kaffe/libraries/javalib/java/util/logging/Level.java:1.2 kaffe/libraries/javalib/java/util/logging/Level.java:1.3
--- kaffe/libraries/javalib/java/util/logging/Level.java:1.2	Wed May 14 23:20:10 2003
+++ kaffe/libraries/javalib/java/util/logging/Level.java	Mon May 17 13:55:07 2004
@@ -40,9 +40,9 @@
 
 package java.util.logging;
 
+import java.io.Serializable;
 import java.util.ResourceBundle;
 
-
 /**
  * A class for indicating logging levels.  A number of commonly used
  * levels is pre-defined (such as <code>java.util.logging.Level.INFO</code>),
@@ -52,8 +52,7 @@
  *
  * @author Sascha Brawer <brawer at acm.org>
  */
-public class Level
-  implements java.io.Serializable
+public class Level implements Serializable
 {
   /* The integer values are the same as in the Sun J2SE 1.4.
    * They have been obtained with a test program. In J2SE 1.4.1,
Index: kaffe/libraries/javalib/java/util/zip/GZIPOutputStream.java
diff -u kaffe/libraries/javalib/java/util/zip/GZIPOutputStream.java:1.6 kaffe/libraries/javalib/java/util/zip/GZIPOutputStream.java:1.7
--- kaffe/libraries/javalib/java/util/zip/GZIPOutputStream.java:1.6	Wed Apr 21 14:59:06 2004
+++ kaffe/libraries/javalib/java/util/zip/GZIPOutputStream.java	Mon May 17 13:55:08 2004
@@ -82,6 +82,7 @@
   {
     super(out, new Deflater(Deflater.DEFAULT_COMPRESSION, true), size);
     
+    crc = new CRC32();
     int mod_time = (int) (System.currentTimeMillis() / 1000L);
     byte[] gzipHeader =
       {




More information about the kaffe mailing list