[cp-patches] Patch: FYI: warning fixes in VM code

Tom Tromey tromey at redhat.com
Thu Mar 2 00:30:05 UTC 2006


I'm checking this in.

This fixes most of the eclipse java warnings in vm/reference.

Tom

2006-03-01  Tom Tromey  <tromey at redhat.com>

	* vm/reference/java/net/VMNetworkInterface.java: Organized imports.
	* vm/reference/java/net/VMInetAddress.java: Organized imports.
	* vm/reference/java/lang/reflect/VMProxy.java (getProxyClass): Added
	imports for javadoc.
	(getProxyClass): Javadoc fixes.
	(getProxyData): Likewise.
	(generateProxyClass): Likewise.
	* vm/reference/java/lang/VMSystem.java (setIn): Javadoc fix.
	(setOut): Likewise.
	(setErr): Likewise.
	* vm/reference/java/lang/VMProcess.java: Javadoc fixes.
	* vm/reference/java/lang/VMClassLoader.java (getResources): Javadoc
	fix.
	* vm/reference/java/lang/VMClass.java (getComponentType): Import for
	javadoc.
	(getModifiers): Likewise.
	(getDeclaredClasses): Javadoc fix.
	(getDeclaredFields): Likewise.
	(getDeclaredMethods): Likewise.
	(getDeclaredConstructors): Likewise.
	* vm/reference/gnu/classpath/VMSystemProperties.java (preInit):
	Javadoc fix.

Index: vm/reference/gnu/classpath/VMSystemProperties.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/gnu/classpath/VMSystemProperties.java,v
retrieving revision 1.4
diff -u -r1.4 VMSystemProperties.java
--- vm/reference/gnu/classpath/VMSystemProperties.java	2 Jul 2005 20:33:08 -0000	1.4
+++ vm/reference/gnu/classpath/VMSystemProperties.java	2 Mar 2006 00:27:17 -0000
@@ -81,7 +81,7 @@
      * <dt>gnu.cpu.endian       <dd>"big" or "little"
      * </dl>
      *
-     * @param p the Properties object to insert the system properties into
+     * @param properties the Properties object to insert the system properties into
      */
     static native void preInit(Properties properties);
 
Index: vm/reference/java/lang/VMClass.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMClass.java,v
retrieving revision 1.14
diff -u -r1.14 VMClass.java
--- vm/reference/java/lang/VMClass.java	1 Aug 2005 10:05:27 -0000	1.14
+++ vm/reference/java/lang/VMClass.java	2 Mar 2006 00:27:17 -0000
@@ -37,9 +37,11 @@
 
 package java.lang;
 
+import java.lang.reflect.Array;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 
 /*
  * This class is a reference version, mainly for compiling a class library
@@ -188,7 +190,7 @@
    * @param ignoreInnerClassesAttrib if set, return the real modifiers, not
    * the ones specified in the InnerClasses attribute.
    * @return the modifiers of this class
-   * @see Modifer
+   * @see Modifier
    * @since 1.1
    */
   static native int getModifiers(Class klass, boolean ignoreInnerClassesAttrib);
@@ -207,7 +209,7 @@
    * Like <code>getDeclaredClasses()</code> but without the security checks.
    *
    * @param klass the Class object that's calling us
-   * @param pulicOnly Only public classes should be returned
+   * @param publicOnly Only public classes should be returned
    */
   static native Class[] getDeclaredClasses(Class klass, boolean publicOnly);
 
@@ -215,7 +217,7 @@
    * Like <code>getDeclaredFields()</code> but without the security checks.
    *
    * @param klass the Class object that's calling us
-   * @param pulicOnly Only public fields should be returned
+   * @param publicOnly Only public fields should be returned
    */
   static native Field[] getDeclaredFields(Class klass, boolean publicOnly);
 
@@ -223,7 +225,7 @@
    * Like <code>getDeclaredMethods()</code> but without the security checks.
    *
    * @param klass the Class object that's calling us
-   * @param pulicOnly Only public methods should be returned
+   * @param publicOnly Only public methods should be returned
    */
   static native Method[] getDeclaredMethods(Class klass, boolean publicOnly);
 
@@ -232,7 +234,7 @@
    * the security checks.
    *
    * @param klass the Class object that's calling us
-   * @param pulicOnly Only public constructors should be returned
+   * @param publicOnly Only public constructors should be returned
    */
   static native Constructor[] getDeclaredConstructors(Class klass, boolean publicOnly);
 
Index: vm/reference/java/lang/VMClassLoader.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMClassLoader.java,v
retrieving revision 1.33
diff -u -r1.33 VMClassLoader.java
--- vm/reference/java/lang/VMClassLoader.java	28 Oct 2005 09:27:55 -0000	1.33
+++ vm/reference/java/lang/VMClassLoader.java	2 Mar 2006 00:27:17 -0000
@@ -170,7 +170,6 @@
    *
    * @param name the resource to find
    * @return an enumeration of resources
-   * @throws IOException if one occurs
    */
   static Enumeration getResources(String name)
   {
Index: vm/reference/java/lang/VMProcess.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMProcess.java,v
retrieving revision 1.7
diff -u -r1.7 VMProcess.java
--- vm/reference/java/lang/VMProcess.java	2 Jul 2005 20:33:08 -0000	1.7
+++ vm/reference/java/lang/VMProcess.java	2 Mar 2006 00:27:17 -0000
@@ -50,7 +50,7 @@
  * is {@link Object#notifyAll notifyAll()}'d each time the state changes.
  * The state of all instances is managed by a single dedicated thread
  * which does the actual fork()/exec() and wait() system calls. User
- * threads {@link Object#wait wait()} on the instance when creating the
+ * threads {@link Object#wait()} on the instance when creating the
  * process or waiting for it to terminate.
  *
  * <p>
@@ -60,7 +60,7 @@
  *
  * @author Archie Cobbs
  * @see Process
- * @see Runtime#exec
+ * @see Runtime#exec(String)
  */
 final class VMProcess extends Process
 {
Index: vm/reference/java/lang/VMSystem.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMSystem.java,v
retrieving revision 1.14
diff -u -r1.14 VMSystem.java
--- vm/reference/java/lang/VMSystem.java	2 Jul 2005 20:33:08 -0000	1.14
+++ vm/reference/java/lang/VMSystem.java	2 Mar 2006 00:27:17 -0000
@@ -101,7 +101,7 @@
    */
 
   /**
-   * Set {@link #in} to a new InputStream.
+   * Set {@link System#in} to a new InputStream.
    *
    * @param in the new InputStream
    * @see #setIn(InputStream)
@@ -109,7 +109,7 @@
   static native void setIn(InputStream in);
 
   /**
-   * Set {@link #out} to a new PrintStream.
+   * Set {@link System#out} to a new PrintStream.
    *
    * @param out the new PrintStream
    * @see #setOut(PrintStream)
@@ -117,7 +117,7 @@
   static native void setOut(PrintStream out);
 
   /**
-   * Set {@link #err} to a new PrintStream.
+   * Set {@link System#err} to a new PrintStream.
    *
    * @param err the new PrintStream
    * @see #setErr(PrintStream)
Index: vm/reference/java/lang/reflect/VMProxy.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/reflect/VMProxy.java,v
retrieving revision 1.1
diff -u -r1.1 VMProxy.java
--- vm/reference/java/lang/reflect/VMProxy.java	26 Jul 2005 09:10:31 -0000	1.1
+++ vm/reference/java/lang/reflect/VMProxy.java	2 Mar 2006 00:27:17 -0000
@@ -83,10 +83,10 @@
    *         were violated, except for problems with null
    * @throws NullPointerException if `interfaces' is null or contains
    *         a null entry, or if handler is null
-   * @see Configuration#HAVE_NATIVE_GET_PROXY_CLASS
+   * @see #HAVE_NATIVE_GET_PROXY_CLASS
    * @see #getProxyClass(ClassLoader, Class[])
    * @see #getProxyData(ClassLoader, Class[])
-   * @see #generateProxyClass(ProxyData)
+   * @see #generateProxyClass(ClassLoader, Proxy.ProxyData)
    */
   static native Class getProxyClass(ClassLoader loader, Class[] interfaces);
 
@@ -105,10 +105,10 @@
    *         were violated, except for problems with null
    * @throws NullPointerException if `interfaces' is null or contains
    *         a null entry, or if handler is null
-   * @see Configuration.HAVE_NATIVE_GET_PROXY_DATA
+   * @see #HAVE_NATIVE_GET_PROXY_DATA
    * @see #getProxyClass(ClassLoader, Class[])
    * @see #getProxyClass(ClassLoader, Class[])
-   * @see ProxyType#getProxyData()
+   * @see Proxy.ProxyData#getProxyData(Proxy.ProxyType)
    */
   static native Proxy.ProxyData getProxyData(ClassLoader loader,
                                              Class[] interfaces);
@@ -129,7 +129,6 @@
    * @throws IllegalArgumentException if VM limitations are exceeded
    * @see #getProxyClass(ClassLoader, Class[])
    * @see #getProxyClass(ClassLoader, Class[])
-   * @see ProxyData#generateProxyClass(ClassLoader)
    */
   static native Class generateProxyClass(ClassLoader loader,
                                          Proxy.ProxyData data);
Index: vm/reference/java/net/VMInetAddress.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/net/VMInetAddress.java,v
retrieving revision 1.2
diff -u -r1.2 VMInetAddress.java
--- vm/reference/java/net/VMInetAddress.java	2 Jul 2005 20:33:08 -0000	1.2
+++ vm/reference/java/net/VMInetAddress.java	2 Mar 2006 00:27:17 -0000
@@ -40,13 +40,7 @@
 
 import gnu.classpath.Configuration;
 
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.ObjectStreamException;
 import java.io.Serializable;
-import java.util.HashMap;
-import java.util.StringTokenizer;
 
 class VMInetAddress implements Serializable
 {
Index: vm/reference/java/net/VMNetworkInterface.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/net/VMNetworkInterface.java,v
retrieving revision 1.3
diff -u -r1.3 VMNetworkInterface.java
--- vm/reference/java/net/VMNetworkInterface.java	7 Aug 2005 21:42:40 -0000	1.3
+++ vm/reference/java/net/VMNetworkInterface.java	2 Mar 2006 00:27:17 -0000
@@ -40,7 +40,6 @@
 
 import gnu.classpath.Configuration;
 
-import java.util.Enumeration;
 import java.util.Vector;
 
 /**



More information about the Classpath-patches mailing list