This patch fixes a number of warnings thrown up when
compiling Classpath with javac (far less than ecj, this
gets rid of nearly all of them).

Changelog:

2007-11-01  Andrew John Hughes  <[EMAIL PROTECTED]>

        * gnu/java/awt/java2d/ScanlineCoverage.java,
        * gnu/javax/net/ssl/provider/ServerHandshake.java:
        Fix non-ASCII characters in the Javadoc comments.
        * gnu/java/lang/management/BeanImpl.java,
        * gnu/javax/management/Server.java,
        * gnu/xml/pipeline/EventFilter.java,
        * java/awt/AWTKeyStroke.java,
        * java/beans/DefaultPersistenceDelegate.java,
        * java/beans/EventHandler.java,
        * java/io/ObjectStreamClass.java,
        * java/lang/Class.java,
        * java/lang/reflect/Proxy.java,
        * javax/management/NotificationBroadcasterSupport.java,
        * javax/management/StandardMBean.java,
        * javax/swing/TransferHandler.java:
        Fix warnings from use of varargs methods.

-- 
Andrew :-)

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: gnu/java/awt/java2d/ScanlineCoverage.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/java2d/ScanlineCoverage.java,v
retrieving revision 1.3
diff -u -3 -p -u -r1.3 ScanlineCoverage.java
--- gnu/java/awt/java2d/ScanlineCoverage.java	24 May 2007 20:28:43 -0000	1.3
+++ gnu/java/awt/java2d/ScanlineCoverage.java	1 Nov 2007 19:57:23 -0000
@@ -157,7 +157,7 @@ public final class ScanlineCoverage
    * A data object that carries information about pixel coverage on a scanline.
    * The data consists of a starting X position on the scanline, the
    * length of the range in pixels and the actual coverage value.
-´  */
+   **/
   public static final class Range
   {
     /**
Index: gnu/java/lang/management/BeanImpl.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/lang/management/BeanImpl.java,v
retrieving revision 1.15
diff -u -3 -p -u -r1.15 BeanImpl.java
--- gnu/java/lang/management/BeanImpl.java	18 Sep 2007 21:52:28 -0000	1.15
+++ gnu/java/lang/management/BeanImpl.java	1 Nov 2007 19:57:24 -0000
@@ -272,7 +272,7 @@ public class BeanImpl
 	Method getter = null;
 	try 
 	  {
-	    getter = vClass.getMethod("get" + field, null);
+	    getter = vClass.getMethod("get" + field);
 	  }
 	catch (NoSuchMethodException e)
 	  {
@@ -280,7 +280,7 @@ public class BeanImpl
 	  }
 	try
 	  {
-	    values.add(getter.invoke(value, null));
+	    values.add(getter.invoke(value));
 	  }
 	catch (IllegalAccessException e)
 	  {
Index: gnu/javax/management/Server.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/javax/management/Server.java,v
retrieving revision 1.4
diff -u -3 -p -u -r1.4 Server.java
--- gnu/javax/management/Server.java	3 May 2007 18:41:29 -0000	1.4
+++ gnu/javax/management/Server.java	1 Nov 2007 19:57:26 -0000
@@ -229,8 +229,8 @@ public class Server
 	  if (name != null)
 	    {
 	      Object bean = getBean(name);
-	      Method method = bean.getClass().getMethod("getMBeanInfo", null);
-	      info = (MBeanInfo) method.invoke(bean, null);
+	      Method method = bean.getClass().getMethod("getMBeanInfo");
+	      info = (MBeanInfo) method.invoke(bean);
 	    }
 	  sm.checkPermission(new MBeanPermission((info == null) ? 
 						 null : info.getClassName(),
@@ -1031,8 +1031,8 @@ public class Server
     checkSecurity(name, null, "getMBeanInfo");
     try
       {
-	Method method = bean.getClass().getMethod("getMBeanInfo", null);
-	return (MBeanInfo) method.invoke(bean, null);
+	Method method = bean.getClass().getMethod("getMBeanInfo");
+	return (MBeanInfo) method.invoke(bean);
       }
     catch (NoSuchMethodException e)
       {
Index: gnu/javax/net/ssl/provider/ServerHandshake.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/javax/net/ssl/provider/ServerHandshake.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 ServerHandshake.java
--- gnu/javax/net/ssl/provider/ServerHandshake.java	10 Dec 2006 20:25:43 -0000	1.2
+++ gnu/javax/net/ssl/provider/ServerHandshake.java	1 Nov 2007 19:57:30 -0000
@@ -775,7 +775,7 @@ class ServerHandshake extends AbstractHa
     //     outgoing buffer. This isn't that great because we'd need to
     //     store and copy things unnecessarily.
     //
-    //  2. Build outgoing handshake objects “virtually,” that is, store them
+    //  2. Build outgoing handshake objects 'virtually', that is, store them
     //     as collections of objects, then compute the length, and then write
     //     them to a buffer, instead of making the objects views on
     //     ByteBuffers for both input and output. This would complicate the
@@ -784,7 +784,7 @@ class ServerHandshake extends AbstractHa
     //     pretty OK), and we still need to figure out how exactly to chunk
     //     those objects across record boundaries.
     //
-    //  3. Try to build these objects on the buffer we’re given, but detect
+    //  3. Try to build these objects on the buffer we're given, but detect
     //     when we run out of space in the output buffer, and split the
     //     overflow message. This sounds like the best, but also probably
     //     the hardest to code.
@@ -1374,4 +1374,4 @@ output_loop:
       setupSecurityParameters(keys, false, engine, compression);
     }
   }
-}
\ No newline at end of file
+}
Index: gnu/xml/pipeline/EventFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/xml/pipeline/EventFilter.java,v
retrieving revision 1.3
diff -u -3 -p -u -r1.3 EventFilter.java
--- gnu/xml/pipeline/EventFilter.java	24 Dec 2005 14:14:48 -0000	1.3
+++ gnu/xml/pipeline/EventFilter.java	1 Nov 2007 19:57:33 -0000
@@ -187,14 +187,14 @@ public class EventFilter
         Method m = null;
 
         try {
-            m = Thread.class.getMethod("getContextClassLoader", null);
+            m = Thread.class.getMethod("getContextClassLoader");
         } catch (NoSuchMethodException e) {
             // Assume that we are running JDK 1.1, use the current ClassLoader
             return EventFilter.class.getClassLoader();
         }
 
         try {
-            return (ClassLoader) m.invoke(Thread.currentThread(), null);
+            return (ClassLoader) m.invoke(Thread.currentThread());
         } catch (IllegalAccessException e) {
             // assert(false)
             throw new UnknownError(e.getMessage());
Index: java/awt/AWTKeyStroke.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/AWTKeyStroke.java,v
retrieving revision 1.15
diff -u -3 -p -u -r1.15 AWTKeyStroke.java
--- java/awt/AWTKeyStroke.java	21 Jun 2007 05:35:45 -0000	1.15
+++ java/awt/AWTKeyStroke.java	1 Nov 2007 19:57:34 -0000
@@ -260,7 +260,7 @@ public class AWTKeyStroke implements Ser
                 c.setAccessible(true);
                 // Create a new instance, to make sure that we can, and
                 // to cause any ClassCastException.
-                AWTKeyStroke dummy = (AWTKeyStroke) c.newInstance(null);
+                AWTKeyStroke dummy = (AWTKeyStroke) c.newInstance();
                 return c;
               }
             });
@@ -632,7 +632,7 @@ public class AWTKeyStroke implements Ser
     else
       try
         {
-          stroke = (AWTKeyStroke) c.newInstance(null);
+          stroke = (AWTKeyStroke) c.newInstance();
           stroke.keyChar = keyChar;
           stroke.keyCode = keyCode;
           stroke.modifiers = modifiers;
Index: java/beans/DefaultPersistenceDelegate.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/DefaultPersistenceDelegate.java,v
retrieving revision 1.3
diff -u -3 -p -u -r1.3 DefaultPersistenceDelegate.java
--- java/beans/DefaultPersistenceDelegate.java	10 Dec 2006 20:25:44 -0000	1.3
+++ java/beans/DefaultPersistenceDelegate.java	1 Nov 2007 19:57:34 -0000
@@ -127,7 +127,7 @@ public class DefaultPersistenceDelegate 
                       {
                         Method readMethod = propertyDescs[i].getReadMethod();
 
-                        args[i] = readMethod.invoke(oldInstance, null);
+                        args[i] = readMethod.invoke(oldInstance);
                       }
                   }
               }
@@ -186,7 +186,7 @@ public class DefaultPersistenceDelegate 
 
             if (readMethod != null && writeMethod != null)
               {
-                Object oldValue = readMethod.invoke(oldInstance, null);
+                Object oldValue = readMethod.invoke(oldInstance);
 
                 if (oldValue != null)
                   out.writeStatement(new Statement(oldInstance,
Index: java/beans/EventHandler.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/EventHandler.java,v
retrieving revision 1.5
diff -u -3 -p -u -r1.5 EventHandler.java
--- java/beans/EventHandler.java	10 Dec 2006 20:25:44 -0000	1.5
+++ java/beans/EventHandler.java	1 Nov 2007 19:57:35 -0000
@@ -173,19 +173,17 @@ public class EventHandler implements Inv
     try
       {
 	// Look for boolean property getter isProperty
-	getter = o.getClass().getMethod("is" + capitalize(prop),
-						 null);
+	getter = o.getClass().getMethod("is" + capitalize(prop));
       }
     catch (NoSuchMethodException nsme1)
       {
         try {
           // Look for regular property getter getProperty
-          getter = o.getClass().getMethod("get" + capitalize(prop),
-						 null);
+          getter = o.getClass().getMethod("get" + capitalize(prop));
         } catch(NoSuchMethodException nsme2) {
             try {
             // Finally look for a method of the name prop
-            getter = o.getClass().getMethod(prop, null);
+            getter = o.getClass().getMethod(prop);
             } catch(NoSuchMethodException nsme3) {
                 // Ok, give up with an intelligent hint for the user.
                 throw new RuntimeException("Method not called: Could not find a property or method '" + prop
@@ -194,7 +192,7 @@ public class EventHandler implements Inv
         }
       }
     try {
-      Object val = getter.invoke(o, null);
+      Object val = getter.invoke(o);
 
       if (rest != null)
         return getProperty(val, rest);
@@ -304,7 +302,7 @@ public class EventHandler implements Inv
     // more specification compliant than the JDK itself because this one will fail in such a case.
     try
       {
-      actionMethod = targetClass.getMethod(action, null);
+      actionMethod = targetClass.getMethod(action);
       }
     catch(NoSuchMethodException nsme)
       {
@@ -342,7 +340,7 @@ public class EventHandler implements Inv
       throw new ArrayIndexOutOfBoundsException(0);
     
     // Invoke target.action(property)
-    return actionMethod.invoke(target, null);
+    return actionMethod.invoke(target);
       } catch(InvocationTargetException ite) {
          throw new RuntimeException(ite.getCause());
       } catch(IllegalAccessException iae) {
Index: java/io/ObjectStreamClass.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamClass.java,v
retrieving revision 1.50
diff -u -3 -p -u -r1.50 ObjectStreamClass.java
--- java/io/ObjectStreamClass.java	27 Oct 2007 23:33:03 -0000	1.50
+++ java/io/ObjectStreamClass.java	1 Nov 2007 19:57:36 -0000
@@ -1056,7 +1056,7 @@ outer:
 
     try
     {
-	return (Externalizable)constructor.newInstance(null);
+	return (Externalizable)constructor.newInstance();
     }
     catch(Exception x)
     {
Index: java/lang/Class.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v
retrieving revision 1.53
diff -u -3 -p -u -r1.53 Class.java
--- java/lang/Class.java	15 Aug 2007 16:27:00 -0000	1.53
+++ java/lang/Class.java	1 Nov 2007 19:57:37 -0000
@@ -1151,7 +1151,7 @@ public final class Class<T> 
       }
     try
       {
-        return constructor.newInstance(null);
+        return constructor.newInstance();
       }
     catch (InvocationTargetException e)
       {
Index: java/lang/reflect/Proxy.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/reflect/Proxy.java,v
retrieving revision 1.27
diff -u -3 -p -u -r1.27 Proxy.java
--- java/lang/reflect/Proxy.java	10 Dec 2006 20:25:45 -0000	1.27
+++ java/lang/reflect/Proxy.java	1 Nov 2007 19:57:37 -0000
@@ -471,9 +471,9 @@ public class Proxy implements Serializab
                                  .getMethod("equals",
                                             new Class[] {Object.class}));
           coreMethods.put(sig, sig);
-          sig = new ProxySignature(Object.class.getMethod("hashCode", null));
+          sig = new ProxySignature(Object.class.getMethod("hashCode"));
           coreMethods.put(sig, sig);
-          sig = new ProxySignature(Object.class.getMethod("toString", null));
+          sig = new ProxySignature(Object.class.getMethod("toString"));
           coreMethods.put(sig, sig);
         }
       catch (Exception e)
Index: javax/management/NotificationBroadcasterSupport.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/NotificationBroadcasterSupport.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 NotificationBroadcasterSupport.java
--- javax/management/NotificationBroadcasterSupport.java	16 Feb 2007 19:20:37 -0000	1.2
+++ javax/management/NotificationBroadcasterSupport.java	1 Nov 2007 19:57:44 -0000
@@ -105,7 +105,7 @@ public class NotificationBroadcasterSupp
    */
   public NotificationBroadcasterSupport()
   {
-    this(null, null);
+    this(null, (MBeanNotificationInfo[]) null);
   }
 
   /**
@@ -124,7 +124,7 @@ public class NotificationBroadcasterSupp
    */
   public NotificationBroadcasterSupport(Executor executor)
   {
-    this(executor, null);
+    this(executor, (MBeanNotificationInfo) null);
   }
 
   /**
Index: javax/management/StandardMBean.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/StandardMBean.java,v
retrieving revision 1.10
diff -u -3 -p -u -r1.10 StandardMBean.java
--- javax/management/StandardMBean.java	1 Apr 2007 16:34:14 -0000	1.10
+++ javax/management/StandardMBean.java	1 Nov 2007 19:57:45 -0000
@@ -228,13 +228,13 @@ public class StandardMBean
     Method getter;
     try 
       {
-	getter = iface.getMethod("get" + name, null);
+	getter = iface.getMethod("get" + name);
       }
     catch (NoSuchMethodException e)
       {
 	try 
 	  {
-	    getter = iface.getMethod("is" + name, null);
+	    getter = iface.getMethod("is" + name);
 	  }
 	catch (NoSuchMethodException ex)
 	  {
@@ -246,7 +246,7 @@ public class StandardMBean
     Object result;
     try
       {
-	result = getter.invoke(impl, null);
+	result = getter.invoke(impl);
       }
     catch (IllegalAccessException e)
       {
Index: javax/swing/TransferHandler.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/TransferHandler.java,v
retrieving revision 1.20
diff -u -3 -p -u -r1.20 TransferHandler.java
--- javax/swing/TransferHandler.java	10 Feb 2007 13:32:57 -0000	1.20
+++ javax/swing/TransferHandler.java	1 Nov 2007 19:57:46 -0000
@@ -149,7 +149,7 @@ public class TransferHandler implements 
           Object o;
           try
             {
-              o = getter.invoke(component, null);
+              o = getter.invoke(component);
               return o;
             }
           catch (Exception ex)

Attachment: signature.asc
Description: Digital signature

Reply via email to