[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath: java.lang

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


PatchSet 4742 
Date: 2004/05/18 01:10:25
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: java.lang

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

        * libraries/javalib/java/lang/CharSequence.java,
        libraries/javalib/java/lang/Compiler.java,
        libraries/javalib/java/lang/Number.java,
        libraries/javalib/java/lang/RuntimePermission.java,
        libraries/javalib/java/lang/SecurityManager.java,
        libraries/javalib/java/lang/StringBuffer.java,
        libraries/javalib/java/lang/reflect/InvocationHandler.java,
        libraries/javalib/java/lang/reflect/Proxy.java:
Resynced with GNU Classpath.

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

* java/lang/Compiler.java,
java/lang/RuntimePermission.java,
java/lang/reflect/InvocationHandler.java,
java/lang/reflect/Proxy.java:
Fixed HTML in javadocs.

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

* java/lang/CharSequence.java
(subSequence): Likewise.
* java/lang/Number.java
(digits): Added comma to array definition.
* java/lang/SecurityManager.java:
Fixed javadocs all over.
* java/lang/String.java
(regionMatches): Fixed @param tag.
(startsWith): Likewise.
(substring): Likewise.
* java/lang/StringBuffer.java
(append): Likewise.

Members: 
	ChangeLog:1.2316->1.2317 
	libraries/javalib/java/lang/CharSequence.java:1.1->1.2 
	libraries/javalib/java/lang/Compiler.java:1.4->1.5 
	libraries/javalib/java/lang/Number.java:1.5->1.6 
	libraries/javalib/java/lang/RuntimePermission.java:1.2->1.3 
	libraries/javalib/java/lang/SecurityManager.java:1.18->1.19 
	libraries/javalib/java/lang/StringBuffer.java:1.25->1.26 
	libraries/javalib/java/lang/reflect/InvocationHandler.java:1.3->1.4 
	libraries/javalib/java/lang/reflect/Proxy.java:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2316 kaffe/ChangeLog:1.2317
--- kaffe/ChangeLog:1.2316	Mon May 17 22:29:38 2004
+++ kaffe/ChangeLog	Tue May 18 01:10:25 2004
@@ -1,3 +1,38 @@
+2004-05-18  Dalibor Topic  <robilad at kaffe.org>
+
+        * libraries/javalib/java/lang/CharSequence.java,
+        libraries/javalib/java/lang/Compiler.java,
+        libraries/javalib/java/lang/Number.java,
+        libraries/javalib/java/lang/RuntimePermission.java,
+        libraries/javalib/java/lang/SecurityManager.java,
+        libraries/javalib/java/lang/StringBuffer.java,
+        libraries/javalib/java/lang/reflect/InvocationHandler.java,
+        libraries/javalib/java/lang/reflect/Proxy.java:
+	Resynced with GNU Classpath.
+
+	2004-04-12  Michael Koch  <konqueror at gmx.de>
+
+	* java/lang/Compiler.java,
+	java/lang/RuntimePermission.java,
+	java/lang/reflect/InvocationHandler.java,
+	java/lang/reflect/Proxy.java:
+	Fixed HTML in javadocs.
+
+	004-04-17  Michael Koch  <konqueror at gmx.de>
+
+	* java/lang/CharSequence.java
+	(subSequence): Likewise.
+	* java/lang/Number.java
+	(digits): Added comma to array definition.
+	* java/lang/SecurityManager.java:
+	Fixed javadocs all over.
+	* java/lang/String.java
+	(regionMatches): Fixed @param tag.
+	(startsWith): Likewise.
+	(substring): Likewise.
+	* java/lang/StringBuffer.java
+	(append): Likewise.
+	
 2004-05-17  Dalibor Topic  <robilad at kaffe.org>
 
 	* libraries/javalib/Klasses.jar.bootstrap:
Index: kaffe/libraries/javalib/java/lang/CharSequence.java
diff -u kaffe/libraries/javalib/java/lang/CharSequence.java:1.1 kaffe/libraries/javalib/java/lang/CharSequence.java:1.2
--- kaffe/libraries/javalib/java/lang/CharSequence.java:1.1	Wed Nov  6 11:52:25 2002
+++ kaffe/libraries/javalib/java/lang/CharSequence.java	Tue May 18 01:10:27 2004
@@ -78,7 +78,7 @@
   int length();
 
   /**
-   * Returns a new <code>CharSequence</char> of the indicated range.
+   * Returns a new <code>CharSequence</code> of the indicated range.
    *
    * @param begin the start index (inclusive)
    * @param end the end index (exclusive)
Index: kaffe/libraries/javalib/java/lang/Compiler.java
diff -u kaffe/libraries/javalib/java/lang/Compiler.java:1.4 kaffe/libraries/javalib/java/lang/Compiler.java:1.5
--- kaffe/libraries/javalib/java/lang/Compiler.java:1.4	Sat Mar 13 16:27:22 2004
+++ kaffe/libraries/javalib/java/lang/Compiler.java	Tue May 18 01:10:27 2004
@@ -81,7 +81,7 @@
   }
 
   /**
-   * Compile the classes whose name matches <code>classNames/code>.
+   * Compile the classes whose name matches <code>classNames</code>.
    *
    * @param classNames the name of classes to compile
    * @return <code>false</code> if no compiler is available or
Index: kaffe/libraries/javalib/java/lang/Number.java
diff -u kaffe/libraries/javalib/java/lang/Number.java:1.5 kaffe/libraries/javalib/java/lang/Number.java:1.6
--- kaffe/libraries/javalib/java/lang/Number.java:1.5	Thu Feb 20 13:52:09 2003
+++ kaffe/libraries/javalib/java/lang/Number.java	Tue May 18 01:10:27 2004
@@ -69,7 +69,7 @@
     '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
     'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
     'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
-    'u', 'v', 'w', 'x', 'y', 'z'
+    'u', 'v', 'w', 'x', 'y', 'z',
   };
 
   /**
Index: kaffe/libraries/javalib/java/lang/RuntimePermission.java
diff -u kaffe/libraries/javalib/java/lang/RuntimePermission.java:1.2 kaffe/libraries/javalib/java/lang/RuntimePermission.java:1.3
--- kaffe/libraries/javalib/java/lang/RuntimePermission.java:1.2	Sat Mar 13 16:27:22 2004
+++ kaffe/libraries/javalib/java/lang/RuntimePermission.java	Tue May 18 01:10:27 2004
@@ -118,7 +118,7 @@
  *       access to in the system</td>
  *   <td>rogue code can stop arbitrary threads</td></tr>
  * <tr>
- *   <td><code>modifyThreadGroup</td>
+ *   <td><code>modifyThreadGroup</code></td>
  *   <td>allows the application to modify thread groups using any of the
  *       methods <code>destroy</code>, <code>resume</code>,
  *       <code>setDaemon</code>, <code>setMaxPriority</code>,
@@ -141,7 +141,7 @@
  *   <td>rogue code can write files, including viruses, and can modify the
  *       virtual machine binary; if not just fill up the disk</td></tr>
  * <tr>
- *   <td><code>loadLibrary.<code><em>library name</em></td>
+ *   <td><code>loadLibrary.</code><em>library name</em></td>
  *   <td>dynamic linking of the named library</td>
  *   <td>native code can bypass many security checks of pure Java</td></tr>
  * <tr>
Index: kaffe/libraries/javalib/java/lang/SecurityManager.java
diff -u kaffe/libraries/javalib/java/lang/SecurityManager.java:1.18 kaffe/libraries/javalib/java/lang/SecurityManager.java:1.19
--- kaffe/libraries/javalib/java/lang/SecurityManager.java:1.18	Wed Apr  7 20:02:38 2004
+++ kaffe/libraries/javalib/java/lang/SecurityManager.java	Tue May 18 01:10:27 2004
@@ -86,7 +86,7 @@
  * // now, in worker thread
  * if (sm != null)
  *   sm.checkPermission(permission, context);
- * <pre>
+ * </pre>
  *
  * <p>Permissions fall into these categories: File, Socket, Net, Security,
  * Runtime, Property, AWT, Reflect, and Serializable. Each of these
@@ -174,13 +174,15 @@
    * Find the ClassLoader of the first non-system class on the execution
    * stack. A non-system class is one whose ClassLoader is not equal to
    * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
-   * will return null in three cases:<br><nl>
+   * will return null in three cases:
+   *
+   * <ul>
    * <li>All methods on the stack are from system classes</li>
    * <li>All methods on the stack up to the first "privileged" caller, as
    *  created by {@link AccessController.doPrivileged(PrivilegedAction)},
    *  are from system classes</li>
    * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
-   * </nl>
+   * </ul>
    * 
    * @return the most recent non-system ClassLoader on the execution stack
    * @deprecated use {@link #checkPermission(Permission)} instead
@@ -194,13 +196,15 @@
    * Find the first non-system class on the execution stack. A non-system
    * class is one whose ClassLoader is not equal to
    * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
-   * will return null in three cases:<br><nl>
+   * will return null in three cases:
+   *
+   * <ul>
    * <li>All methods on the stack are from system classes</li>
    * <li>All methods on the stack up to the first "privileged" caller, as
    *  created by {@link AccessController.doPrivileged(PrivilegedAction)},
    *  are from system classes</li>
    * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
-   * </nl>
+   * </ul>
    * 
    * @return the most recent non-system Class on the execution stack
    * @deprecated use {@link #checkPermission(Permission)} instead
@@ -231,13 +235,15 @@
    * Get the depth on the execution stack of the most recent non-system class.
    * A non-system class is one whose ClassLoader is not equal to
    * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
-   * will return -1 in three cases:<br><nl>
+   * will return -1 in three cases:
+   *
+   * <ul>
    * <li>All methods on the stack are from system classes</li>
    * <li>All methods on the stack up to the first "privileged" caller, as
    *  created by {@link AccessController.doPrivileged(PrivilegedAction)},
    *  are from system classes</li>
    * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
-   * </nl>
+   * </ul>
    * 
    * @return the index of the most recent non-system Class on the stack
    * @deprecated use {@link #checkPermission(Permission)} instead
@@ -365,8 +371,8 @@
    * Check if the current thread is allowed to modify another Thread. This is
    * called by Thread.stop(), suspend(), resume(), interrupt(), destroy(),
    * setPriority(), setName(), and setDaemon(). The default implementation
-   * checks <code>RuntimePermission("modifyThread") on system threads (ie.
-   * threads in ThreadGroup with a null parent), and returns silently on
+   * checks <code>RuntimePermission("modifyThread")</code> on system threads
+   * (ie. threads in ThreadGroup with a null parent), and returns silently on
    * other threads.
    *
    * <p>If you override this, you must do two things. First, call
@@ -398,8 +404,8 @@
    * ThreadGroup.ThreadGroup() (to add this ThreadGroup to a parent),
    * ThreadGroup.stop(), suspend(), resume(), interrupt(), destroy(),
    * setDaemon(), and setMaxPriority(). The default implementation
-   * checks <code>RuntimePermission("modifyThread") on the system group (ie.
-   * the one with a null parent), and returns silently on other groups.
+   * checks <code>RuntimePermission("modifyThread")</code> on the system group
+   * (ie. the one with a null parent), and returns silently on other groups.
    *
    * <p>If you override this, you must do two things. First, call
    * <code>super.checkAccess(t)</code>, to make sure you are not relaxing
@@ -651,13 +657,15 @@
    * @param host the host to connect to
    * @param port the port to connect on
    * @param context the context to determine access for
+   *
    * @throws SecurityException if permission is denied, or if context is
    *         not an AccessControlContext
    * @throws NullPointerException if host is null
+   *
    * @see #getSecurityContext()
    * @see AccessControlContext#checkPermission(Permission)
    */
-  public void checkConnect(String host, int port, Object securityContext)
+  public void checkConnect(String host, int port, Object context)
   {
     // XXX Should be:
     // if (! (context instanceof AccessControlContext))
@@ -776,9 +784,12 @@
    * you override this, call <code>super.checkPropertyAccess</code> rather
    * than throwing an exception.
    *
+   * @param key the key of the property to check
+   *
    * @throws SecurityException if permission is denied
    * @throws NullPointerException if key is null
    * @throws IllegalArgumentException if key is ""
+   *
    * @see System#getProperty(String)
    */
   public void checkPropertyAccess(String key)
@@ -862,8 +873,7 @@
    */
   public void checkAwtEventQueueAccess()
   {
-    // Should be: checkPermission(new AWTPermission("accessEventQueue"));
-    throw new SecurityException("Cannot access the AWT event queue.");
+    checkPermission(new AWTPermission("accessEventQueue"));
   }
 
   /**
Index: kaffe/libraries/javalib/java/lang/StringBuffer.java
diff -u kaffe/libraries/javalib/java/lang/StringBuffer.java:1.25 kaffe/libraries/javalib/java/lang/StringBuffer.java:1.26
--- kaffe/libraries/javalib/java/lang/StringBuffer.java:1.25	Sun Mar  7 17:10:53 2004
+++ kaffe/libraries/javalib/java/lang/StringBuffer.java	Tue May 18 01:10:27 2004
@@ -396,7 +396,7 @@
   /**
    * Append the <code>char</code> to this <code>StringBuffer</code>.
    *
-   * @param c the <code>char</code> to append
+   * @param ch the <code>char</code> to append
    * @return this <code>StringBuffer</code>
    */
   public synchronized StringBuffer append(char ch)
Index: kaffe/libraries/javalib/java/lang/reflect/InvocationHandler.java
diff -u kaffe/libraries/javalib/java/lang/reflect/InvocationHandler.java:1.3 kaffe/libraries/javalib/java/lang/reflect/InvocationHandler.java:1.4
--- kaffe/libraries/javalib/java/lang/reflect/InvocationHandler.java:1.3	Sat Mar 13 16:27:22 2004
+++ kaffe/libraries/javalib/java/lang/reflect/InvocationHandler.java	Tue May 18 01:10:28 2004
@@ -49,37 +49,38 @@
  * interface.  But in order for the proxy instance to do any good, it
  * needs to know what to do when interface methods are invoked!  So,
  * this interface is basically a cool wrapper that provides runtime
- * code generation needed by proxy instances.<p>
+ * code generation needed by proxy instances.
  *
- * While this interface was designed for use by Proxy, it will also
- * work on any object in general.<p>
+ * <p>While this interface was designed for use by Proxy, it will also
+ * work on any object in general.</p>
  *
- * Hints for implementing this class:<br>
+ * <p>Hints for implementing this class:</p>
+ * 
  * <ul>
- *  <li>Don't forget that Object.equals, Object.hashCode, and
- *      Object.toString will call this handler.  In particular,
- *      a naive call to proxy.equals, proxy.hashCode, or proxy.toString
- *      will put you in an infinite loop.  And remember that string
- *      concatenation also invokes toString.</li>
- *  <li>Obey the contract of the Method object you are handling, or
- *      the proxy instance will be forced to throw a
- *      {@link NullPointerException}, {@link ClassCastException},
- *      or {@link UndeclaredThrowableException}.</li>
- *  <li>Be prepared to wrap/unwrap primitives as necessary.</li>
- *  <li>The Method object may be owned by a different interface than
- *      what was actually used as the qualifying type of the method
- *      invocation in the Java source code. This means that it might
- *      not always be safe to throw an exception listed as belonging
- *      to the method's throws clause.</li>
+ * <li>Don't forget that Object.equals, Object.hashCode, and
+ *     Object.toString will call this handler.  In particular,
+ *     a naive call to proxy.equals, proxy.hashCode, or proxy.toString
+ *     will put you in an infinite loop.  And remember that string
+ *     concatenation also invokes toString.</li>
+ * <li>Obey the contract of the Method object you are handling, or
+ *     the proxy instance will be forced to throw a
+ *     {@link NullPointerException}, {@link ClassCastException},
+ *     or {@link UndeclaredThrowableException}.</li>
+ * <li>Be prepared to wrap/unwrap primitives as necessary.</li>
+ * <li>The Method object may be owned by a different interface than
+ *     what was actually used as the qualifying type of the method
+ *     invocation in the Java source code. This means that it might
+ *     not always be safe to throw an exception listed as belonging
+ *     to the method's throws clause.</li>
  * </ul>
  *
  * <p><small>For a fun time, create an InvocationHandler that handles the
- * methods of a proxy instance of the InvocationHandler interface!</small>
+ * methods of a proxy instance of the InvocationHandler interface!</small></p>
  *
  * @see Proxy
  * @see UndeclaredThrowableException
  *
- * @author Eric Blake <ebb9 at email.byu.edu>
+ * @author Eric Blake (ebb9 at email.byu.edu)
  * @since 1.3
  * @status updated to 1.4
  */
Index: kaffe/libraries/javalib/java/lang/reflect/Proxy.java
diff -u kaffe/libraries/javalib/java/lang/reflect/Proxy.java:1.4 kaffe/libraries/javalib/java/lang/reflect/Proxy.java:1.5
--- kaffe/libraries/javalib/java/lang/reflect/Proxy.java:1.4	Wed Apr 28 16:22:43 2004
+++ kaffe/libraries/javalib/java/lang/reflect/Proxy.java	Tue May 18 01:10:28 2004
@@ -211,35 +211,36 @@
    * Returns the proxy {@link Class} for the given ClassLoader and array
    * of interfaces, dynamically generating it if necessary.
    *
-   * There are several restrictions on this method, the violation of
+   * <p>There are several restrictions on this method, the violation of
    * which will result in an IllegalArgumentException or
-   * NullPointerException:
+   * NullPointerException:</p>
+   * 
    * <ul>
-   *  <li>All objects in `interfaces' must represent distinct interfaces.
-   *      Classes, primitive types, null, and duplicates are forbidden.</li>
-   *  <li>The interfaces must be visible in the specified ClassLoader.
-   *      In other words, for each interface i:
-   *      <code>Class.forName(i.getName(), false, loader) == i</code>
-   *      must be true.</li>
-   *  <li>All non-public interfaces (if any) must reside in the same
-   *      package, or the proxy class would be non-instantiable.  If
-   *      there are no non-public interfaces, the package of the proxy
-   *      class is unspecified.</li>
-   *  <li>All interfaces must be compatible - if two declare a method
-   *      with the same name and parameters, the return type must be
-   *      the same and the throws clause of the proxy class will be
-   *      the maximal subset of subclasses of the throws clauses for
-   *      each method that is overridden.</li>
-   *  <li>VM constraints limit the number of interfaces a proxy class
-   *      may directly implement (however, the indirect inheritance
-   *      of {@link Serializable} does not count against this limit).
-   *      Even though most VMs can theoretically have 65535
-   *      superinterfaces for a class, the actual limit is smaller
-   *      because a class's constant pool is limited to 65535 entries,
-   *      and not all entries can be interfaces.</li>
-   * </ul><p>
+   * <li>All objects in `interfaces' must represent distinct interfaces.
+   *     Classes, primitive types, null, and duplicates are forbidden.</li>
+   * <li>The interfaces must be visible in the specified ClassLoader.
+   *     In other words, for each interface i:
+   *     <code>Class.forName(i.getName(), false, loader) == i</code>
+   *     must be true.</li>
+   * <li>All non-public interfaces (if any) must reside in the same
+   *     package, or the proxy class would be non-instantiable.  If
+   *     there are no non-public interfaces, the package of the proxy
+   *     class is unspecified.</li>
+   * <li>All interfaces must be compatible - if two declare a method
+   *     with the same name and parameters, the return type must be
+   *     the same and the throws clause of the proxy class will be
+   *     the maximal subset of subclasses of the throws clauses for
+   *     each method that is overridden.</li>
+   * <li>VM constraints limit the number of interfaces a proxy class
+   *     may directly implement (however, the indirect inheritance
+   *     of {@link Serializable} does not count against this limit).
+   *     Even though most VMs can theoretically have 65535
+   *     superinterfaces for a class, the actual limit is smaller
+   *     because a class's constant pool is limited to 65535 entries,
+   *     and not all entries can be interfaces.</li>
+   * </ul>
    *
-   * Note that different orders of interfaces produce distinct classes.
+   * <p>Note that different orders of interfaces produce distinct classes.</p>
    *
    * @param loader the class loader to define the proxy class in; null
    *        implies the bootstrap class loader




More information about the kaffe mailing list