This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: Patch: java.net


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Donnerstag, 25. September 2003 10:26 schrieb Michael Koch:
> Hi list,
>
>
> I commited the attached patch to fix some things in
> java.net.URLConnection and to get java.net.InetAddress nearer to
> classpath's version.

Bryce pointed out that the patch is missing and it indeed is. :-/
I wonder who stole it. I attach now a new copy.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/crTjWSOgCCdjSDsRAsJIAJ90hmJXPs+v8ui+MrYbGSXviLJvWQCgleWn
QTj0OtmHiTu4giBNuWZSeek=
=EyL2
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2173
diff -u -b -B -r1.2173 ChangeLog
--- ChangeLog	24 Sep 2003 05:39:23 -0000	1.2173
+++ ChangeLog	25 Sep 2003 06:34:01 -0000
@@ -1,3 +1,14 @@
+2003-09-25  Michael Koch  <konqueror@gmx.de>
+
+	* java/net/InetAddress.java:
+	Reorder imports, remove implementation comment.
+	(isMulticastAddress): Merged documentation from classpath.
+	* java/net/URLConnection.java
+	(setRequestProperty): Check key for null, fix documentation.
+	(adREquestProperty): Check key for null, remove wrong implementation
+	and replace it with comment to overwrite this method in subclasses,
+	fix documentation.
+
 2003-09-24  Michael Koch  <konqueror@gmx.de>
 
 	* acinclude.m4 (AM_LC_LOCALES): Added check for locale.h.
Index: java/net/InetAddress.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/InetAddress.java,v
retrieving revision 1.18
diff -u -b -B -r1.18 InetAddress.java
--- java/net/InetAddress.java	22 Sep 2003 07:56:44 -0000	1.18
+++ java/net/InetAddress.java	25 Sep 2003 06:34:01 -0000
@@ -38,18 +38,11 @@
 
 package java.net;
 
+import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
 import java.io.ObjectStreamException;
-
-/*
- * Written using on-line Java Platform 1.2 API Specification, as well
- * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
- * (The latter turns out to have some errors ...)
- * Status:  Believed complete and correct.
- */
+import java.io.Serializable;
 
 /**
  * This class models an Internet address.  It does not have a public
@@ -137,7 +130,11 @@
   }
 
   /**
-   * Utility routine to check if the InetAddress is an IP multicast address
+   * Returns true if this address is a multicast address, false otherwise.
+   * An address is multicast if the high four bits are "1110".  These are
+   * also known as "Class D" addresses.
+   *
+   * @return true if mulitcast, false if not
    *
    * @since 1.1
    */
Index: java/net/URLConnection.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/URLConnection.java,v
retrieving revision 1.22
diff -u -b -B -r1.22 URLConnection.java
--- java/net/URLConnection.java	19 Jun 2003 15:08:22 -0000	1.22
+++ java/net/URLConnection.java	25 Sep 2003 06:34:01 -0000
@@ -698,11 +698,10 @@
   }
 
   /**
-   * Returns the default value used to determine whether or not caching
-   * of documents will be done when possible.
+   * Sets the value of the named request property
    *
-   * @param key Key of the property to set
-   * @param value Value of the Property to set
+   * @param key The name of the property
+   * @param value The value of the property
    *
    * @exception IllegalStateException If already connected
    * @exception NullPointerException If key is null
@@ -717,12 +716,16 @@
     if (connected)
       throw new IllegalStateException ("Already connected");
 
+    if (key == null)
+      throw new NullPointerException ("key is null");
+    
     // Do nothing unless overridden by subclasses that support setting
     // header fields in the request.
   }
 
   /**
-   * Sets the value of the named request property
+   * Adds a new request property by a key/value pair.
+   * This method does not overwrite* existing properties with the same key.
    *
    * @param key Key of the property to add
    * @param value Value of the Property to add
@@ -740,10 +743,11 @@
     if (connected)
       throw new IllegalStateException ("Already connected");
 
-    if (getRequestProperty (key) == null)
-      {
-        setRequestProperty (key, value);
-      }
+    if (key == null)
+      throw new NullPointerException ("key is null");
+    
+    // Do nothing unless overridden by subclasses that support adding
+    // header fields in the request.
   }
 
   /**

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]