From MAILER-DAEMON Mon Dec 01 18:24:41 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AQxPE-0002ou-I2 for mharc-commit-classpath@gnu.org; Mon, 01 Dec 2003 18:24:40 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AQxPB-0002oH-E0 for commit-classpath@gnu.org; Mon, 01 Dec 2003 18:24:37 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AQxOe-0002iM-0v for commit-classpath@gnu.org; Mon, 01 Dec 2003 18:24:36 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AQxOa-0002gT-FA for commit-classpath@gnu.org; Mon, 01 Dec 2003 18:24:00 -0500 Received: from graydon by subversions.gnu.org with local (Exim 4.20) id 1AQwPT-0007Km-1g for commit-classpath@gnu.org; Mon, 01 Dec 2003 17:20:51 -0500 To: commit-classpath@gnu.org Message-Id: From: graydon hoare Date: Mon, 01 Dec 2003 17:20:51 -0500 Subject: classpath ./ChangeLog javax/swing/JLayeredPane.... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: graydon@pobox.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2003 23:24:38 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: graydon hoare 03/12/01 17:20:51 Modified files: . : ChangeLog javax/swing : JLayeredPane.java Log message: 2003-12-01 Graydon Hoare * javax/swing/JLayeredPane.java: Conform to mauve test, javadoc. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1660&tr2=1.1661&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JLayeredPane.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text From MAILER-DAEMON Mon Dec 01 19:36:40 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AQyWn-0003sd-Oh for mharc-commit-classpath@gnu.org; Mon, 01 Dec 2003 19:36:33 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AQyQx-0002vz-7l for commit-classpath@gnu.org; Mon, 01 Dec 2003 19:30:31 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AQy5D-0000Nz-IO for commit-classpath@gnu.org; Mon, 01 Dec 2003 19:08:34 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AQvV6-0004kw-P7 for commit-classpath@gnu.org; Mon, 01 Dec 2003 16:22:36 -0500 Received: from tromey by subversions.gnu.org with local (Exim 4.20) id 1AQuVt-0002Sz-Q5 for commit-classpath@gnu.org; Mon, 01 Dec 2003 15:19:21 -0500 To: commit-classpath@gnu.org Message-Id: From: Tom Tromey Date: Mon, 01 Dec 2003 15:19:21 -0500 Subject: classpath ./ChangeLog java/awt/TextComponent.ja... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: tromey@redhat.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 00:36:31 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Tom Tromey 03/12/01 15:19:21 Modified files: . : ChangeLog java/awt : TextComponent.java native/jni/gtk-peer: gnu_java_awt_peer_gtk_GtkTextComponentPeer.c Log message: 2003-12-01 Olga Rodimina * java/awt/TextComponent.java: (getSelectionStart): Updated javadocs. (getSelectionEnd): Ditto. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer: (getSelectionStart): Changed to return caret position if no text is selected (getSelectionEnd): Ditto. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1659&tr2=1.1660&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/TextComponent.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text From MAILER-DAEMON Mon Dec 01 21:59:37 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR03q-0007h7-Kw for mharc-commit-classpath@gnu.org; Mon, 01 Dec 2003 21:14:46 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AQyfZ-000561-HU for commit-classpath@gnu.org; Mon, 01 Dec 2003 19:45:37 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AQuEs-0000NH-0C for commit-classpath@gnu.org; Mon, 01 Dec 2003 15:02:17 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AQskp-0003kV-WD for commit-classpath@gnu.org; Mon, 01 Dec 2003 13:26:40 -0500 Received: from fitzsim by subversions.gnu.org with local (Exim 4.20) id 1AQrlV-0004tf-GM for commit-classpath@gnu.org; Mon, 01 Dec 2003 12:23:17 -0500 To: commit-classpath@gnu.org Message-Id: From: Thomas Fitzsimmons Date: Mon, 01 Dec 2003 12:23:17 -0500 Subject: classpath ./ChangeLog gnu/java/awt/peer/gtk/Gtk... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: fitzsim@redhat.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 02:14:45 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Thomas Fitzsimmons 03/12/01 12:23:17 Modified files: . : ChangeLog gnu/java/awt/peer/gtk: GtkImage.java java/awt/image : ImageConsumer.java PixelGrabber.java Log message: 2003-12-01 Thomas Fitzsimmons * gnu/java/awt/peer/gtk/GtkImage.java (setDimensions, setProperties): Check that io is not null before calling io.imageUpdate. * java/awt/image/ImageConsumer.java (setPixels, imageComplete): Update javadocs. * java/awt/image/PixelGrabber.java: Fix implementation and update javadocs. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1658&tr2=1.1659&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/peer/gtk/GtkImage.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/image/ImageConsumer.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/image/PixelGrabber.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text From MAILER-DAEMON Mon Dec 01 22:19:07 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR0vS-0007kw-8Z for mharc-commit-classpath@gnu.org; Mon, 01 Dec 2003 22:10:10 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AQzMi-0001hV-19 for commit-classpath@gnu.org; Mon, 01 Dec 2003 20:30:12 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AQyj2-0005L6-8K for commit-classpath@gnu.org; Mon, 01 Dec 2003 19:49:27 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AQxiN-0005UJ-2m for commit-classpath@gnu.org; Mon, 01 Dec 2003 18:44:27 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AQwgI-00033Q-AS for commit-classpath@gnu.org; Mon, 01 Dec 2003 17:38:14 -0500 Received: from graydon by subversions.gnu.org with local (Exim 4.20) id 1AQwdc-0007lm-Kh for commit-classpath@gnu.org; Mon, 01 Dec 2003 17:35:28 -0500 To: commit-classpath@gnu.org Message-Id: From: graydon hoare Date: Mon, 01 Dec 2003 17:35:28 -0500 Subject: classpath ./ChangeLog java/awt/Container.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: graydon@pobox.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 03:10:08 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: graydon hoare 03/12/01 17:35:28 Modified files: . : ChangeLog java/awt : Container.java Log message: 2003-12-01 Graydon Hoare * java/awt/Container.java (swapComponents): New method. * (visitChild): Handle null clip bounds. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1661&tr2=1.1662&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/Container.java.diff?tr1=1.22&tr2=1.23&r1=text&r2=text From MAILER-DAEMON Mon Dec 01 23:44:27 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR1zb-0001Ag-Ej for mharc-commit-classpath@gnu.org; Mon, 01 Dec 2003 23:18:31 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR0qC-0006fl-8a for commit-classpath@gnu.org; Mon, 01 Dec 2003 22:04:44 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR0Ur-0003En-Oc for commit-classpath@gnu.org; Mon, 01 Dec 2003 21:42:51 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR00L-00070A-3X for commit-classpath@gnu.org; Mon, 01 Dec 2003 21:11:09 -0500 Received: from tromey by subversions.gnu.org with local (Exim 4.20) id 1AQz1D-0003eh-Na for commit-classpath@gnu.org; Mon, 01 Dec 2003 20:07:59 -0500 To: commit-classpath@gnu.org Message-Id: From: Tom Tromey Date: Mon, 01 Dec 2003 20:07:59 -0500 Subject: classpath ./ChangeLog native/jni/gtk-peer/gnu_j... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: tromey@redhat.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 04:18:29 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Tom Tromey 03/12/01 20:07:59 Modified files: . : ChangeLog native/jni/gtk-peer: gnu_java_awt_peer_gtk_GtkTextAreaPeer.c Log message: 2003-12-01 Kim Ho * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): Disable wrapping if TextArea has horizontal scroll bars. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1663&tr2=1.1664&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c.diff?tr1=1.10&tr2=1.11&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 00:56:06 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR3Vv-0007ok-Gy for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 00:55:59 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR24O-0002Qe-Eb for commit-classpath@gnu.org; Mon, 01 Dec 2003 23:23:28 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AQyho-0005Dm-BG for commit-classpath@gnu.org; Mon, 01 Dec 2003 19:48:27 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AQyhn-0005BK-IL for commit-classpath@gnu.org; Mon, 01 Dec 2003 19:47:55 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AQxjt-0008Pd-5A for commit-classpath@gnu.org; Mon, 01 Dec 2003 18:46:01 -0500 Received: from fitzsim by subversions.gnu.org with local (Exim 4.20) id 1AQxi8-0001Ov-Ps for commit-classpath@gnu.org; Mon, 01 Dec 2003 18:44:12 -0500 To: commit-classpath@gnu.org Message-Id: From: Thomas Fitzsimmons Date: Mon, 01 Dec 2003 18:44:12 -0500 Subject: classpath ./ChangeLog gnu/java/awt/peer/gtk/Gdk... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: fitzsim@redhat.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 05:55:57 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Thomas Fitzsimmons 03/12/01 18:44:12 Modified files: . : ChangeLog gnu/java/awt/peer/gtk: GdkFontMetrics.java native/jni/gtk-peer: gnu_java_awt_peer_gtk_GdkFontMetrics.c gnu_java_awt_peer_gtk_GtkEvents.c Log message: 2003-12-01 Thomas Fitzsimmons * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler): Hard-code inset values. * gnu/java/awt/peer/gtk/GdkFontMetrics.java (GdkFontMetrics): Pass font name, not XLFD, to initState. (stringWidth(String, int, String)): New method. (stringWidth(String)): Call new stringWidth. (getLeading): Always return 0. * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c (initState): New Pango implementation. (stringWidth): Likewise. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1662&tr2=1.1663&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/peer/gtk/GdkFontMetrics.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c.diff?tr1=1.16&tr2=1.17&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 05:06:46 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR7Qb-0003Xw-LF for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 05:06:45 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR7QY-0003Wp-SG for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:06:42 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR7Q2-0003Rd-Mh for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:06:41 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR7Q2-0003RR-B4 for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:06:10 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR6QO-0004jB-DA for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:02:28 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR6Oe-00031f-Dp for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:00:40 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:00:40 -0500 Subject: classpath ./ChangeLog gnu/java/net/protocol/fil... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 10:06:43 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:00:40 Modified files: . : ChangeLog gnu/java/net/protocol/file: Handler.java Log message: 2003-12-02 Michael Koch * gnu/java/net/protocol/file/Handler.java: Reformated. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1664&tr2=1.1665&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/file/Handler.java.diff?tr1=1.11&tr2=1.12&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 05:37:43 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR7uX-0001cr-AU for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 05:37:41 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR7uO-0001bN-CF for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:37:32 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR7tq-0001SG-Cx for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:37:29 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR7tp-0001Rv-QF for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:36:57 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR6uj-0004iF-8n for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:33:49 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:33:49 -0500 Subject: classpath ./ChangeLog include/gnu_java_awt_peer... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 10:37:34 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:33:49 Modified files: . : ChangeLog include : gnu_java_awt_peer_gtk_GdkFontMetrics.h Log message: 2003-12-02 Michael Koch * include/gnu_java_awt_peer_gtk_GdkFontMetrics.h: Regenerated. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1670&tr2=1.1671&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/include/gnu_java_awt_peer_gtk_GdkFontMetrics.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 05:40:05 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR7wm-0002Dd-1w for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 05:40:00 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR7wd-0002Ap-10 for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:51 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR7vy-00021Q-Qr for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:41 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR7vx-000212-E4 for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:09 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR6bP-0005pn-95 for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:13:51 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR6Zj-0003bm-Ll for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:12:07 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:12:07 -0500 Subject: classpath ./ChangeLog gnu/java/lang/ClassLoader... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 10:39:56 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:12:07 Modified files: . : ChangeLog gnu/java/lang : ClassLoaderHelper.java SystemClassLoader.java Log message: 2003-12-02 Michael Koch * gnu/java/lang/ClassLoaderHelper.java: Explicitly import used classes. * gnu/java/lang/SystemClassLoader.java (systemFindResource): Fixed typo. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1668&tr2=1.1669&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/lang/ClassLoaderHelper.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/lang/SystemClassLoader.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 05:40:14 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR7wz-0002HY-9k for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 05:40:13 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR7wq-0002Eg-Jb for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:40:04 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR7wA-00024O-0D for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:54 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR7oY-0000dT-JF for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:31:30 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR6pS-0004Ue-49 for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:28:22 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:28:22 -0500 Subject: classpath ./ChangeLog gnu/java/net/protocol/fil... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 10:40:09 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:28:22 Modified files: . : ChangeLog gnu/java/net/protocol/file: Handler.java gnu/java/net/protocol/http: Connection.java Log message: 2003-12-02 Michael Koch * gnu/java/net/protocol/file/Handler.java: (openConnection): Handle case when host part of file: URL is set. * gnu/java/net/protocol/http/Connection.java: Reformated. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1669&tr2=1.1670&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/file/Handler.java.diff?tr1=1.12&tr2=1.13&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/http/Connection.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 05:40:46 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR7xV-0002PH-Cg for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 05:40:45 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR7ww-0002GH-5n for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:40:10 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR7wJ-00027H-Gl for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:40:02 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR7wI-000273-JT for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:30 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR6Re-0004p1-5N for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:03:46 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR6Po-00036F-8G for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:01:52 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:01:52 -0500 Subject: classpath ./ChangeLog gnu/java/net/protocol/jar... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 10:40:43 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:01:52 Modified files: . : ChangeLog gnu/java/net/protocol/jar: Handler.java Log message: 2003-12-02 Michael Koch * gnu/java/net/protocol/jar/Handler.java: Reformated. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1665&tr2=1.1666&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/jar/Handler.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 06:01:34 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR8Hb-0006D7-9Q for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 06:01:31 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR8HX-0006CW-VA for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:01:27 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR8Gw-00068Z-5H for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:01:21 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR8C8-0005Ov-GR for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:55:52 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR72B-0000VX-Bi for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:41:31 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR70N-0004vP-8w for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:39:39 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:39:39 -0500 Subject: classpath ./ChangeLog java/text/DateFormat.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 11:01:29 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:39:39 Modified files: . : ChangeLog java/text : DateFormat.java Log message: 2003-12-02 Michael Koch * java/text/DateFormat.java: Explicitely import used classes. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1671&tr2=1.1672&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/text/DateFormat.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 06:11:51 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR7wt-0002Fu-QL for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 05:40:07 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR7wi-0002CJ-Mc for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:56 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR7w4-00022s-Hb for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:47 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR7w0-00021v-Lc for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:39:12 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR6Ut-00059W-Dp for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:07:07 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR6TD-0003Hz-2F for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:05:23 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:05:23 -0500 Subject: classpath ./ChangeLog gnu/java/net/protocol/jar... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 10:40:00 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:05:23 Modified files: . : ChangeLog gnu/java/net/protocol/jar: Connection.java Log message: 2003-12-02 Michael Koch * gnu/java/net/protocol/jar/Connection.java: Reformated. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1666&tr2=1.1667&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/jar/Connection.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 06:16:11 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR8Rt-0008SC-VX for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 06:12:09 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR8Q4-0007vp-8i for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:10:16 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR8Nt-0007T5-Mf for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:08:32 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR8B3-0005Ov-Lc for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:54:45 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR7AJ-0001B7-Np for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:49:55 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR78e-0005Hr-Ev for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:48:12 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:48:12 -0500 Subject: classpath ./ChangeLog java/net/Socket.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 11:12:07 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:48:12 Modified files: . : ChangeLog java/net : Socket.java Log message: 2003-12-02 Michael Koch * java/net/Socket.java (implCreated): New variable that indicates created impl. (getImpl): New method. (toString): Return more SUN compliant string representation. (various): Use getImpl() instead of impl. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1672&tr2=1.1673&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/Socket.java.diff?tr1=1.33&tr2=1.34&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 06:17:27 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR8W2-0001Gz-OZ for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 06:16:26 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR8Um-0000uo-6K for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:15:08 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR7l4-000066-Dr for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:28:25 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR7l2-00005W-Ql for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:27:52 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR6ZJ-0005aZ-8Z for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:11:41 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR6Xd-0003Uc-TY for commit-classpath@gnu.org; Tue, 02 Dec 2003 04:09:57 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 04:09:57 -0500 Subject: classpath ./ChangeLog gnu/java/net/protocol/fil... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 11:16:24 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 04:09:57 Modified files: . : ChangeLog gnu/java/net/protocol/file: Connection.java Log message: 2003-12-02 Michael Koch * gnu/java/net/protocol/file/Connection.java: Reformated. (inputStream): Made an InputStream. (outputStream): Made an OutputStream. (connect): Don't throw FileNotFoundException directly. FileInputStream constructor does this for us. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1667&tr2=1.1668&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/net/protocol/file/Connection.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 06:21:45 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR8as-0002vB-1Q for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 06:21:26 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR8VN-00013o-Af for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:15:45 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR8QR-00081s-3F for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:11:11 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR8ND-0007LS-FK for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:07:19 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR7O4-0005qG-SR for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:04:08 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 05:04:09 -0500 Subject: classpath ./ChangeLog java/net/DatagramSocket.j... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 11:21:24 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 05:04:08 Modified files: . : ChangeLog java/net : DatagramSocket.java MulticastSocket.java Socket.java Log message: 2003-12-02 Michael Koch * java/net/DatagramSocket.java (DatagramSocket): Move binding code to bind(), simplify constructors. * java/net/MulticastSocket.java (MulticastSocket): Call parent constructor with null argument, bind socket after setReuseAddress is called, simplify constructors. * java/net/Socket.java (various): Some more getImpl() fixes. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1673&tr2=1.1674&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/DatagramSocket.java.diff?tr1=1.31&tr2=1.32&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/MulticastSocket.java.diff?tr1=1.19&tr2=1.20&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/Socket.java.diff?tr1=1.34&tr2=1.35&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 06:52:16 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR8zH-0000xr-Nx for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 06:46:39 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR8su-0008UE-Rc for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:40:04 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR8qh-0008Mk-C8 for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:38:18 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR8q1-0008BO-IV for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:37:05 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR7qv-000700-55 for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:33:57 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 05:33:57 -0500 Subject: classpath ./ChangeLog java/net/DatagramSocket.j... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 11:46:38 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 05:33:57 Modified files: . : ChangeLog java/net : DatagramSocket.java MulticastSocket.java ServerSocket.java Socket.java Log message: 2003-12-02 Michael Koch * java/net/DatagramSocket.java (factory): Made private. (closed): Removed. (DatagramSocket): Check impl argument, use constructor with SocketAddress argument. (close): Set impl to null, use isClosed(). (isClosed): Check for impl == null. (getLocalAddress): Use isClosed(). (getLocalPort): Check if socket is closed. (getSoTimeout): Likewise. (setSoTimeout): Likewise. (getSendBufferSize): Likewise. (setSendBufferSize): Likewise. (getReceiveBufferSize): Likewise. (setReceiveBufferSize): Likewise. (receive): Likewise. (send): Likewise. (bind): Likewise. (connect): Likewise. (setReuseAddress): Likewise. (getReuseAddress): Likewise. (setBroadcast): Likewise. (getBroadcast): Likewise. (setTrafficClass): Likewise. (getTrafficClass): Likewise. * java/net/MulticastSocket.java (getInterface): Check if socket is closed. (getTTL): Likewise. (getTimeToLive): Likewise. (setInterface): Likewise. (setNetworkInterface): Likewise. (getNetworkInterface): Likewise. (setLoopbackMode): Likewise. (setTTL): Likewise. (setTimeToLive): Likewise. (joinGroup): Likewise. (leaveGroup): Likewise. (send): Likewise. * java/net/ServerSocket.java (closed): Removed. (close): Check if socket is closed, set impl to null. (isClosed): Check impl == null; (ServerSocket): Check impl argument. (getInetAddress): Check if socket is bound. (getLocalPort): Likewise. (getLocalSocketAddress): Likewise. (bind): Check if socket is closed. (implAccept): Likewise. (setSoTimeout): Likewise. (getSoTimeout): Likewise. (setReuseAddress): Likewise. (getReuseAddress): Likewise. (setReceiveBufferSize): Likewise. (getReceiveBufferSize): Likewise. * java/net/Socket.java (closed): Removed. (Socket): Fixed documentation. (connect): Check if socket is closed, changed exception text, fixed documentation. (getInputStream): Check of socket is closed and connected. (getOutputStream): Likewise. (bind): Check if socket is closed. (setTcpNoDelay): Likewise. (getTcpNoDelay): Likewise. (setSoLinger): Likewise. (getSoLinger): Likewise. (sendUrgentData): Likewise. (setOOBInline): Likewise. (getOOBInline): Likewise. (setSoTimeout): Likewise. (getSoTimeout): Likewise. (setSendBufferSize): Likewise. (getSendBufferSize): Likewise. (setReceiveBufferSize): Likewise. (getReceiveBufferSize): Likewise. (setKeepAlive): Likewise. (getKeepAlive): Likewise. (close): Likewise. (shutdownInput): Likewise. (shutdownOutput): Likewise. (getReuseAddress): Likewise. (getTrafficClass): Likewise. (setTrafficClass): Likewise. (isClosed): Check impl == null. (toString): Added missing ']'. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1674&tr2=1.1675&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/DatagramSocket.java.diff?tr1=1.32&tr2=1.33&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/MulticastSocket.java.diff?tr1=1.20&tr2=1.21&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/ServerSocket.java.diff?tr1=1.27&tr2=1.28&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/Socket.java.diff?tr1=1.35&tr2=1.36&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 06:58:03 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR902-000133-5w for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 06:47:26 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR8zq-00012Q-BD for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:47:14 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR8zJ-0000y9-6F for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:47:12 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR8xA-0000hd-AD for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:44:28 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR7za-0007YL-4S for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:42:54 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR7xp-0007Dw-Vw for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:41:05 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 05:41:05 -0500 Subject: classpath ./ChangeLog java/net/ServerSocket.jav... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 11:47:15 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 05:41:05 Modified files: . : ChangeLog java/net : ServerSocket.java Socket.java Log message: 2003-12-02 Michael Koch * java/net/Socket.java (implCreated): Dont set default value explicitely, added documentation. (inputShutdown): Likewise. (outputShutdown): Likewise. (bound): New private member variable. (bind): Set bound to true. (close): Set bound to false. (isBound): Return bound. * java/net/ServerSocket.java (bound): New private member variable. (bind): Set bound to true. (close): Set bound to false. (isBound): Return bound. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1675&tr2=1.1676&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/ServerSocket.java.diff?tr1=1.28&tr2=1.29&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/Socket.java.diff?tr1=1.36&tr2=1.37&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 07:40:05 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AR9ov-0007j6-86 for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 07:40:01 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR9or-0007i9-NH for commit-classpath@gnu.org; Tue, 02 Dec 2003 07:39:57 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR9L5-0003k4-1t for commit-classpath@gnu.org; Tue, 02 Dec 2003 07:09:42 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR9Ex-0002oH-Fw for commit-classpath@gnu.org; Tue, 02 Dec 2003 07:02:51 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR892-0000PW-1o for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:52:40 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR87M-0007VX-N9 for commit-classpath@gnu.org; Tue, 02 Dec 2003 05:50:56 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 05:50:56 -0500 Subject: classpath ./ChangeLog java/net/DatagramSocket.j... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 12:39:59 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 05:50:56 Modified files: . : ChangeLog java/net : DatagramSocket.java MulticastSocket.java Log message: 2003-12-02 Michael Koch * java/net/DatagramSocket.java (impl): Made private. (bound): New private member variable. (DatagramSocket): Fixed documentation, use getImpl(). (getImpl): New package-private method. (isClosed): Use getImpl(). (getLocalAddress): Completed documentation, use getImpl(). (getLocalPort): Use getImpl(). (getSoTimeout): Likewise. (setSoTimeout): Likewise. (getSendBufferSize): Likewise. (setSendBufferSize): Likewise. (getReceiveBufferSize): Likewise. (setReceiveBufferSize): Likewise. (connect): Likewise. (disconnect): Likewise. (receive): Likewise. (send): Likewise. (setReuseAddress): Likewise. (setTrafficClass): Likewise. (bind): Added message to exception. (isClosed): Completed documentation. (getChannel): Likewise. (connect): Added missing exception, refined exception message. (isBound): Completed documentation, just return bound. (isConnected): Completed documentation. (getRemoteSocketAddress): Likewise. (getReuseAddress): Completed documentation, use getImpl(). (setSoBroadcast): Likewise. (getSoBroadcast): Likewise. (getTrafficClass): Likewise. (getLocalSocketAddress): Simplified. * java/net/MulticastSocket.java (MulticastSocket): Removed comment not applying anymore. (getInterface): Use getImpl(). (getTTL): Likewise. (getTimeToLive): Likewise. (setInterface): Likewise. (setNetworkInterface): Likewise. (getNetworkInterface): Likewise. (setLoopback): Likewise. (getLoopback): Likewise. (setTTL): Likewise. (setTimeToLive): Likewise. (joinGroup): Likewise. (leaveGroup): Likewise. (send): Likewise. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1676&tr2=1.1677&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/DatagramSocket.java.diff?tr1=1.33&tr2=1.34&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/MulticastSocket.java.diff?tr1=1.21&tr2=1.22&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 08:27:59 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARAZL-0001sb-GL for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 08:27:59 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR9rm-0008Oa-2m for commit-classpath@gnu.org; Tue, 02 Dec 2003 07:42:58 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR9hJ-0006lr-1W for commit-classpath@gnu.org; Tue, 02 Dec 2003 07:32:40 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AR9ch-0005ZZ-JK for commit-classpath@gnu.org; Tue, 02 Dec 2003 07:27:23 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AR8f6-0003sE-Iu for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:25:48 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1AR8dR-0000Bu-AG for commit-classpath@gnu.org; Tue, 02 Dec 2003 06:24:05 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 06:24:05 -0500 Subject: classpath ./ChangeLog java/net/DatagramSocket.j... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 13:27:57 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 06:24:05 Modified files: . : ChangeLog java/net : DatagramSocket.java ServerSocket.java Socket.java Log message: 2003-12-02 Michael Koch * java/net/DatagramSocket.java (DatagramSocket): Call other sister constructor. (connect): Revised exception message. (setBroadcast): Renamed on to enable. (getLocalAddress): Completed documentation. (getChannel): Likewise. (isBound): Likewise. (isConnected): Likewise. (getRemoteSocketAddress): Likewise. (getLocalSocketAddress): Likewise. (getReuseAddress): Likewise. (setBroadcast): Likewise. (getTrafficClass): Likewise. * java/net/ServerSocket.java (getLocalSocketAddress): Simplified. (accept): Renamed s to socket. (implAccept): Likewise. (toString): Made it compliant to SUNs JDK. * java/net/Socket.java (impl): Make private. (getInetAddress): Check if socket is connected. (getPort): Likewise. (getInputStream): Likewise. (getOutputStream): Likewise. (getLocalPort): Check if socket is bound. (shutdownOutput): Readd accidently removed "getImpl().shutdownOutput()". (connect): Completed documentation. (getOOBInline): Likewise. (getReuseAddress): Likewise. (getTrafficClass): Likewise. (isConnected): Likewise. (isBound): Likewise. (isClosed): Likewise. (isInputShutdown): Likewise. (isOutputShutdown): Likewise. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1677&tr2=1.1678&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/DatagramSocket.java.diff?tr1=1.34&tr2=1.35&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/ServerSocket.java.diff?tr1=1.29&tr2=1.30&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/Socket.java.diff?tr1=1.37&tr2=1.38&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 11:41:37 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARDah-0008Pf-Lv for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 11:41:35 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARDad-0008Nw-P1 for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:41:31 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARDa2-0008Bi-Fq for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:41:25 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARDa1-0008BR-Va for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:40:54 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1ARCav-0000Ys-IC for commit-classpath@gnu.org; Tue, 02 Dec 2003 10:37:45 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 10:37:45 -0500 Subject: classpath ./ChangeLog java/nio/channels/spi/Abs... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 16:41:33 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 10:37:45 Modified files: . : ChangeLog java/nio/channels/spi: AbstractInterruptibleChannel.java Log message: 2003-12-02 Michael Koch * java/nio/channels/spi/AbstractInterruptibleChannel.java (opened): Removed. (closed): New field. (close): Check of channel is closed already. (isOpen): Return !closed. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1678&tr2=1.1679&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/nio/channels/spi/AbstractInterruptibleChannel.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 11:55:35 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARDoB-0004y2-6n for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 11:55:31 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARDns-0004o0-0b for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:55:12 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARDn9-0004IX-Qe for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:54:58 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARDn9-0004ID-BN for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:54:27 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1ARChG-0005v2-A0 for commit-classpath@gnu.org; Tue, 02 Dec 2003 10:44:18 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1ARCfb-0000jF-0A for commit-classpath@gnu.org; Tue, 02 Dec 2003 10:42:35 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 10:42:35 -0500 Subject: classpath ./ChangeLog java/net/DatagramSocket.j... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 16:55:21 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 10:42:34 Modified files: . : ChangeLog java/net : DatagramSocket.java Socket.java Log message: 2003-12-02 Michael Koch * java/net/DatagramSocket.java (close): Close associated DatagramChannel object. * java/net/Socket.java (close): Reset impl and bound before calling getChannel().close() to prevent from loops. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1679&tr2=1.1680&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/DatagramSocket.java.diff?tr1=1.35&tr2=1.36&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/Socket.java.diff?tr1=1.38&tr2=1.39&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 12:54:16 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AREj1-0003Av-F0 for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 12:54:15 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AREix-00038z-U6 for commit-classpath@gnu.org; Tue, 02 Dec 2003 12:54:11 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AREiN-00030u-EO for commit-classpath@gnu.org; Tue, 02 Dec 2003 12:54:06 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AREiM-00030D-LL for commit-classpath@gnu.org; Tue, 02 Dec 2003 12:53:34 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1ARDjB-0002sA-PO for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:50:21 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 11:50:21 -0500 Subject: classpath ./ChangeLog javax/swing/JLayeredPane.... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 17:54:13 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 11:50:21 Modified files: . : ChangeLog javax/swing : JLayeredPane.java Log message: 2003-12-02 Graydon Hoare * javax/swing/JLayeredPane.java: Implement. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1680&tr2=1.1681&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JLayeredPane.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 13:12:12 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARF05-0008Nn-Gc for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 13:11:53 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AREyd-0007l6-D8 for commit-classpath@gnu.org; Tue, 02 Dec 2003 13:10:23 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARExz-0007V7-BV for commit-classpath@gnu.org; Tue, 02 Dec 2003 13:10:14 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARElf-0003qX-1L for commit-classpath@gnu.org; Tue, 02 Dec 2003 12:56:59 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1ARDmY-00032E-9D for commit-classpath@gnu.org; Tue, 02 Dec 2003 11:53:50 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Tue, 02 Dec 2003 11:53:50 -0500 Subject: classpath ./ChangeLog gnu/java/io/PlatformHelpe... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 18:11:51 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/02 11:53:50 Modified files: . : ChangeLog gnu/java/io : PlatformHelper.java Log message: 2003-12-02 Michael Koch * gnu/java/io/PlatformHelper.java: Reformated. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1681&tr2=1.1682&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/io/PlatformHelper.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 14:45:58 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARGSk-00087e-6r for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 14:45:34 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARGRS-0006hk-DO for commit-classpath@gnu.org; Tue, 02 Dec 2003 14:44:14 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARGMQ-00047R-TI for commit-classpath@gnu.org; Tue, 02 Dec 2003 14:39:34 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARGMP-00046W-Ey for commit-classpath@gnu.org; Tue, 02 Dec 2003 14:39:01 -0500 Received: from glavaux by subversions.gnu.org with local (Exim 4.20) id 1ARFNI-0006t3-9f for commit-classpath@gnu.org; Tue, 02 Dec 2003 13:35:52 -0500 To: commit-classpath@gnu.org Message-Id: From: Guilhem Lavaux Date: Tue, 02 Dec 2003 13:35:52 -0500 Subject: classpath ./ChangeLog gnu/java/lang/reflect/Typ... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: guilhem.lavaux@free.fr List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 19:45:32 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Guilhem Lavaux 03/12/02 13:35:52 Modified files: . : ChangeLog gnu/java/lang/reflect: TypeSignature.java java/io : ObjectInputStream.java ObjectOutputStream.java ObjectStreamClass.java ObjectStreamField.java Log message: Merged in three of the four patches about serialization. 2003-12-02 Guilhem Lavaux * java/io/ObjectInputStream.java: (setBooleanField): Throw an InvalidClassException if the field hasn't the required type. (setByteField): Likewise. (setCharField): Likewise. (setDoubleField): Likewise. (setFloatField): Likewise. (setIntField): Likewise. (setShortField): Likewise. (setLongField): Likewise. (setObjectField): Likewise. 2003-12-02 Guilhem Lavaux * java/io/ObjectStreamField.java: A few methods were added in prevision of the upcoming upgrade of the serialization code. (ObjectStreamField): We should throw a NullPointerException when 'name' is null. 2003-12-02 Guilhem Lavaux , Helmer Kraemer * gnu/java/lang/reflect/TypeSignature.java (getClassForEncoding): Splitted the method so we can specify an explicit boot loader. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1682&tr2=1.1683&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/lang/reflect/TypeSignature.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/io/ObjectInputStream.java.diff?tr1=1.32&tr2=1.33&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/io/ObjectOutputStream.java.diff?tr1=1.39&tr2=1.40&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/io/ObjectStreamClass.java.diff?tr1=1.24&tr2=1.25&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/io/ObjectStreamField.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 16:13:08 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARHpU-0001Fn-Bo for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 16:13:08 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARHpQ-0001Ds-Pt for commit-classpath@gnu.org; Tue, 02 Dec 2003 16:13:04 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARHdy-0006gL-1J for commit-classpath@gnu.org; Tue, 02 Dec 2003 16:01:45 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARHYP-0004jn-NO for commit-classpath@gnu.org; Tue, 02 Dec 2003 15:55:29 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1ARGR8-0008GL-4E for commit-classpath@gnu.org; Tue, 02 Dec 2003 14:43:54 -0500 Received: from fitzsim by subversions.gnu.org with local (Exim 4.20) id 1ARGPT-0003Sm-2Y for commit-classpath@gnu.org; Tue, 02 Dec 2003 14:42:11 -0500 To: commit-classpath@gnu.org Message-Id: From: Thomas Fitzsimmons Date: Tue, 02 Dec 2003 14:42:11 -0500 Subject: classpath ./ChangeLog gnu/java/awt/image/ImageD... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: fitzsim@redhat.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 21:13:06 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Thomas Fitzsimmons 03/12/02 14:42:11 Modified files: . : ChangeLog gnu/java/awt/image: ImageDecoder.java XBMDecoder.java gnu/java/awt/peer/gtk: GdkPixbufDecoder.java GtkComponentPeer.java GtkImage.java GtkToolkit.java include : gnu_java_awt_peer_gtk_GdkPixbufDecoder.h gnu_java_awt_peer_gtk_GtkComponentPeer.h gnu_java_awt_peer_gtk_GtkToolkit.h java/awt : Component.java MediaTracker.java native/jni/gtk-peer: Makefile.am Log message: 2003-12-02 Thomas Fitzsimmons * include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h, include/gnu_java_awt_peer_gtk_GtkComponentPeer.h, include/gnu_java_awt_peer_gtk_GtkToolkit.h: Regenerate. * native/jni/gtk-peer/Makefile.am: Add gnu_java_awt_peer_gtk_GdkPixbufDecoder.c. * gnu/java/awt/image/ImageDecoder.java (ImageDecoder(byte[],int,int)): New constructor. (startProduction): Create ByteArrayInputStream when url and filename are null. (produce): Declare stream parameter as InputStream. * gnu/java/awt/image/XBMDecoder.java (produce): Declare stream parameter as InputStream. * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java (GdkPixbufDecoder(byte[],int,int)): New constructor. (produce): Declare stream parameter as InputStream. * gnu/java/awt/peer/gtk/GtkComponentPeer.java (prepareImage): Throw NPE if image is null. Set image's observer before running PrepareImage thread. Pass image to startProduction. * gnu/java/awt/peer/gtk/GtkImage.java: Add null checks before calls to source's member functions. (observer): New field. (setObserver): New method. (setDimensions, setPixels, imageComplete): Call observer's imageUpdate. * gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage, getImage): Return new GtkImage. (prepareImage): Implement. * java/awt/Component.java: Add static fields incrementalDraw and redrawRate. (imageUpdate): Implement. (createImage): Call Toolkit's createImage if peer is null. (prepareImage): Throw NPE if image is null. * java/awt/MediaTracker.java: Fix return value. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1683&tr2=1.1684&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/image/ImageDecoder.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/image/XBMDecoder.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java.diff?tr1=1.54&tr2=1.55&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/peer/gtk/GtkImage.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/gnu/java/awt/peer/gtk/GtkToolkit.java.diff?tr1=1.43&tr2=1.44&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/include/gnu_java_awt_peer_gtk_GtkToolkit.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/Component.java.diff?tr1=1.22&tr2=1.23&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/MediaTracker.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/native/jni/gtk-peer/Makefile.am.diff?tr1=1.2&tr2=1.3&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 17:36:22 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARJ7k-0003FV-IC for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 17:36:04 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARJ5n-0002fI-0I for commit-classpath@gnu.org; Tue, 02 Dec 2003 17:34:03 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARIjq-0005sI-Uc for commit-classpath@gnu.org; Tue, 02 Dec 2003 17:11:53 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARIjL-0005g4-Vl for commit-classpath@gnu.org; Tue, 02 Dec 2003 17:10:51 -0500 Received: from fitzsim by subversions.gnu.org with local (Exim 4.20) id 1ARHkF-0006Ip-24 for commit-classpath@gnu.org; Tue, 02 Dec 2003 16:07:43 -0500 To: commit-classpath@gnu.org Message-Id: From: Thomas Fitzsimmons Date: Tue, 02 Dec 2003 16:07:43 -0500 Subject: classpath ./ChangeLog native/jni/gtk-peer/gnu_j... X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: fitzsim@redhat.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 22:36:03 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Thomas Fitzsimmons 03/12/02 16:07:42 Modified files: . : ChangeLog native/jni/gtk-peer: gnu_java_awt_peer_gtk_GdkFontMetrics.c Log message: 2003-12-02 Thomas Fitzsimmons * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c (initState): Mark obj parameter as unused. (stringWidth): Mark obj parameter as unused. Initialize font_name properly. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1685&tr2=1.1686&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 17:37:27 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARJ6h-0002tX-KD for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 17:34:59 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARIli-0006UY-8h for commit-classpath@gnu.org; Tue, 02 Dec 2003 17:13:18 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARI91-0005Rg-Kv for commit-classpath@gnu.org; Tue, 02 Dec 2003 16:33:51 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARI91-0005RQ-0E for commit-classpath@gnu.org; Tue, 02 Dec 2003 16:33:19 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1ARH3q-00021Q-7G for commit-classpath@gnu.org; Tue, 02 Dec 2003 15:23:54 -0500 Received: from graydon by subversions.gnu.org with local (Exim 4.20) id 1ARH2A-0004mU-VK for commit-classpath@gnu.org; Tue, 02 Dec 2003 15:22:10 -0500 To: commit-classpath@gnu.org Message-Id: From: graydon hoare Date: Tue, 02 Dec 2003 15:22:10 -0500 Subject: classpath ./ChangeLog java/awt/Container.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: graydon@pobox.com List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 22:34:57 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: graydon hoare 03/12/02 15:22:10 Modified files: . : ChangeLog java/awt : Container.java Log message: 2003-12-02 Graydon Hoare * Container.java (LightweightDispatcher): Expand implementation. (visitChild): Use existing graphics object, rather than clone. (dispatchEventImpl): Call LightweightDispatcher if it exists. (addNotifyContainerChildren): Build LightweightDispatcher. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1684&tr2=1.1685&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/Container.java.diff?tr1=1.23&tr2=1.24&r1=text&r2=text From MAILER-DAEMON Tue Dec 02 19:42:26 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARL4z-0004pn-Pi for mharc-commit-classpath@gnu.org; Tue, 02 Dec 2003 19:41:21 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARL3v-0004Zo-65 for commit-classpath@gnu.org; Tue, 02 Dec 2003 19:40:15 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARL3J-0004Ox-Qd for commit-classpath@gnu.org; Tue, 02 Dec 2003 19:40:09 -0500 Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARL3H-0004NX-DM for commit-classpath@gnu.org; Tue, 02 Dec 2003 19:39:35 -0500 Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.24) id 1ARK5n-0006PG-71 for classpath-commits@gnu.org; Tue, 02 Dec 2003 18:38:07 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARKxI-00039c-Fz for classpath-commits@gnu.org; Tue, 02 Dec 2003 19:33:55 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARKxG-00039D-9j for classpath-commits@gnu.org; Tue, 02 Dec 2003 19:33:22 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1ARJrt-0008BU-5u for classpath-commits@gnu.org; Tue, 02 Dec 2003 18:23:45 -0500 Received: from www-data by subversions.gnu.org with local (Exim 4.20) id 1ARJqD-0001vN-NA for classpath-commits@gnu.org; Tue, 02 Dec 2003 18:22:01 -0500 To: classpath-commits@gnu.org From: Archie Cobbs X-Savannah-Server: savannah.gnu.org:80 [199.232.41.3] X-Savannah-Project: classpath X-Savannah-Artifact: bugs X-Savannah-Artifact-ID: 6938 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021106 X-Apparently-From: 24.196.18.187 X-Copy-To: Array Message-Id: Sender: www-data Date: Tue, 02 Dec 2003 18:22:01 -0500 Cc: Subject: [bugs #6938] SystemClassLoader ignores java.class.path property for classfiles X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2003 00:41:13 -0000 This mail is an automated notification from the bugs tracker of the project: classpath. /**************************************************************************/ [bugs #6938] Full Item Snapshot: URL: Project: classpath Submitted by: Archie Cobbs On: Tue 12/02/2003 at 23:22 Severity: 5 - Average Resolution: None Assigned to: None Status: Open Platform Version: None Summary: SystemClassLoader ignores java.class.path property for classfiles Original Submission: It appears that while gnu.java.lang.SystemClassLoader is written with the intent to use the "java.class.path" system property as its search path for classfiles, in fact this doesn't work. The reason is that the "java.class.path" logic is implemented via SystemClassLoader.findResource(), but this method is not invoked by the superclass (java.lang.ClassLoader) when searching for class files. Instead, the call trace goes like this: ClassLoader.loadClass() -> ClassLoader.findClass() -> throw new ClassNotFoundException() Now, this of course only happens when the parent class loader (in this case the JVM boot loader) is unable to load the class. But this is a perfectly valid case. Often times, the "bootstrap" class path (which is used by the JVM boot loader, but is entirely separate from the application class path specified by the "java.class.path" system property) contains the class file being searched for, which masks this bug, but not always. To witness this bug, try setting your boot class path to NOT contain ".". Then set the "java.class.path" system property to contain ".". Now try to run a class from the command line that is in the current working directory (in some random directory). This will work with e.g. Sun's JDK but not with a Classpath based JVM. The fix is for SystemClassLoader to override the findClass() method. The Classpath javadoc for ClassLoader.findClass() gives sample code for doing so. For detailed info, follow this link: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From MAILER-DAEMON Wed Dec 03 04:23:48 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1ARTEa-0005ro-Ac for mharc-commit-classpath@gnu.org; Wed, 03 Dec 2003 04:23:48 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARTEX-0005rR-I6 for commit-classpath@gnu.org; Wed, 03 Dec 2003 04:23:45 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARTE1-0005lP-Ss for commit-classpath@gnu.org; Wed, 03 Dec 2003 04:23:44 -0500 Received: from [199.232.41.2] (helo=subversions.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARTE0-0005l9-TJ for commit-classpath@gnu.org; Wed, 03 Dec 2003 04:23:12 -0500 Received: from mkoch by subversions.gnu.org with local (Exim 4.20) id 1ARSEu-0003l6-5w for commit-classpath@gnu.org; Wed, 03 Dec 2003 03:20:04 -0500 To: commit-classpath@gnu.org Message-Id: From: Michael Koch Date: Wed, 03 Dec 2003 03:20:04 -0500 Subject: classpath ./ChangeLog java/awt/List.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: konqueror@gmx.de List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2003 09:23:46 -0000 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Michael Koch 03/12/03 03:20:04 Modified files: . : ChangeLog java/awt : List.java Log message: 2003-12-03 Fernando Nasser * java/awt/List.java (getSelectedIndex): Return -1 if no list element is selected. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.1686&tr2=1.1687&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/List.java.diff?tr1=1.15&tr2=1.16&r1=text&r2=text From MAILER-DAEMON Thu Dec 25 12:38:00 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZZQu-0005tz-4o for mharc-commit-classpath@gnu.org; Thu, 25 Dec 2003 12:38:00 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZZQr-0005sW-KU for commit-classpath@gnu.org; Thu, 25 Dec 2003 12:37:57 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZZQL-0005GT-BP for commit-classpath@gnu.org; Thu, 25 Dec 2003 12:37:56 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZZQK-0005FO-Lg for commit-classpath@gnu.org; Thu, 25 Dec 2003 12:37:24 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZYSh-0004YG-00 for ; Thu, 25 Dec 2003 17:35:47 +0100 From: Mark Wielaard To: commit-classpath@gnu.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-uUK1WK9o7gfQxEB5GHZg" Message-Id: <1072370156.23020.55.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 25 Dec 2003 17:35:56 +0100 Subject: [PATCH] Better jar URL parsing. X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2003 17:37:58 -0000 --=-uUK1WK9o7gfQxEB5GHZg Content-Type: multipart/mixed; boundary="=-LChMYzkwnPllSb7KjKJl" --=-LChMYzkwnPllSb7KjKJl Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, The following is a patch that already went into kaffe and libgcj. 2003-12-25 Guilhem Lavaux =20 * gnu/java/net/URLParseError.java: New file. * gnu/java/net/protocol/jar/Handler.java (parseURL): Throw URLParseError if needed, fix '/' handling. * java/net/URL.java (URL): Catch URLParseError and transform it into a MalformedURLException. =20 * gnu/java/net/Makefile.am (EXTRA_DIST): Add URLParseError.java. I am committing this. Cheers, Mark --=-LChMYzkwnPllSb7KjKJl Content-Disposition: inline; filename=jar_url.patch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name=jar_url.patch; charset=ISO-8859-1 SW5kZXg6IGdudS9qYXZhL25ldC9NYWtlZmlsZS5hbQ0KPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9j dnNyb290L2NsYXNzcGF0aC9jbGFzc3BhdGgvZ251L2phdmEvbmV0L01ha2VmaWxlLmFtLHYNCnJl dHJpZXZpbmcgcmV2aXNpb24gMS42DQpkaWZmIC11IC1yMS42IE1ha2VmaWxlLmFtDQotLS0gZ251 L2phdmEvbmV0L01ha2VmaWxlLmFtCTkgT2N0IDIwMDMgMTY6MDQ6MjIgLTAwMDAJMS42DQorKysg Z251L2phdmEvbmV0L01ha2VmaWxlLmFtCTI1IERlYyAyMDAzIDE2OjMzOjAxIC0wMDAwDQpAQCAt NSw1ICs1LDUgQEANCiBFWFRSQV9ESVNUID0gXA0KIEhlYWRlckZpZWxkSGVscGVyLmphdmEgXA0K IFBsYWluRGF0YWdyYW1Tb2NrZXRJbXBsLmphdmEgXA0KLVBsYWluU29ja2V0SW1wbC5qYXZhDQot DQorUGxhaW5Tb2NrZXRJbXBsLmphdmEgXA0KK1VSTFBhcnNlRXJyb3IuamF2YQ0KSW5kZXg6IGdu dS9qYXZhL25ldC9VUkxQYXJzZUVycm9yLmphdmENCj09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBmaWxlOiBnbnUv amF2YS9uZXQvVVJMUGFyc2VFcnJvci5qYXZhDQpkaWZmIC1OIGdudS9qYXZhL25ldC9VUkxQYXJz ZUVycm9yLmphdmENCi0tLSAvZGV2L251bGwJMSBKYW4gMTk3MCAwMDowMDowMCAtMDAwMA0KKysr IGdudS9qYXZhL25ldC9VUkxQYXJzZUVycm9yLmphdmEJMjUgRGVjIDIwMDMgMTY6MzM6MDEgLTAw MDANCkBAIC0wLDAgKzEsNTcgQEANCisvKiBVUkxQYXJ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mKCcjJywgY29sb24gKyAxKTsNCi0gICAgdGhpcy5waC5wYXJz ZVVSTCh0aGlzLCBzcGVjLCBjb2xvbiArIDEsDQotCQkgICAgIGhhc2hBdCA8IDAgPyBzcGVjLmxl bmd0aCgpIDogaGFzaEF0KTsNCisNCisgICAgdHJ5DQorICAgICAgew0KKwl0aGlzLnBoLnBhcnNl VVJMKHRoaXMsIHNwZWMsIGNvbG9uICsgMSwNCisJCQkgaGFzaEF0IDwgMCA/IHNwZWMubGVuZ3Ro KCkgOiBoYXNoQXQpOw0KKyAgICAgIH0NCisgICAgY2F0Y2ggKFVSTFBhcnNlRXJyb3IgZSkNCisg ICAgICB7DQorCXRocm93IG5ldyBNYWxmb3JtZWRVUkxFeGNlcHRpb24oZS5nZXRNZXNzYWdlKCkp Ow0KKyAgICAgIH0NCisgICAgDQogICAgIGlmIChoYXNoQXQgPj0gMCkNCiAgICAgICByZWYgPSBz cGVjLnN1YnN0cmluZyhoYXNoQXQgKyAxKTsNCiANCg== --=-LChMYzkwnPllSb7KjKJl-- --=-uUK1WK9o7gfQxEB5GHZg Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD4DBQA/6xHsxVhZCJWr9QwRAtVSAJjv22lL9CyL7U782oQ62PCvf6wiAJ9nGLR/ ORMe0dPsfLQIhzY9AgoB3w== =eHww -----END PGP SIGNATURE----- --=-uUK1WK9o7gfQxEB5GHZg-- From MAILER-DAEMON Thu Dec 25 13:18:37 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZa4D-0003DO-Gt for mharc-commit-classpath@gnu.org; Thu, 25 Dec 2003 13:18:37 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZa45-0003Ai-Hp for commit-classpath@gnu.org; Thu, 25 Dec 2003 13:18:29 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZa2s-0002ar-2P for commit-classpath@gnu.org; Thu, 25 Dec 2003 13:17:45 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AZa29-00026c-Fb for commit-classpath@gnu.org; Thu, 25 Dec 2003 13:16:29 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AZYwL-0007xc-Va for commit-classpath@gnu.org; Thu, 25 Dec 2003 12:06:26 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZYwB-0004dr-00 for ; Thu, 25 Dec 2003 18:06:15 +0100 From: Mark Wielaard To: commit-classpath@gnu.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Fg1+UW+aTXO5kDZgFLwo" Message-Id: <1072371983.23020.63.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 25 Dec 2003 18:06:23 +0100 Subject: [PATCH] Use -bootclasspath with JAVAH X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2003 18:18:30 -0000 --=-Fg1+UW+aTXO5kDZgFLwo Content-Type: multipart/mixed; boundary="=-qXR7pLMaYOwEjafQJm1s" --=-qXR7pLMaYOwEjafQJm1s Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, I was getting different .h files depending on the JAVAH in use (gcjh from gcc 3.3 or 3.4). The following patch uses -bootclasspath, not -classpath for header generation. I have regenerated all header files with this and the ones that needed updating are also in this patch. 2003-12-25 Mark Wielaard * include/Makefile.am (ARG_CLASSPATH_JAVAH): Use -bootclasspath. * include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h: Regenerated. * include/gnu_java_awt_peer_gtk_GtkComponentPeer.h: Likewise. * include/gnu_java_awt_peer_gtk_GtkToolkit.h: Likewise. * include/java_lang_VMSystem.h: Likewise. I will commit this. Cheers, Mark P.S. While hacking on classpath from CVS you might want to use the --enable-regen-headers and --enable-maintainer-mode flags to configure to catch these kind of things. --=-qXR7pLMaYOwEjafQJm1s Content-Disposition: inline; filename=javah.patch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name=javah.patch; charset=ISO-8859-1 PyBqYXJfdXJsLnBhdGNoDQo/IGphdmFoLnBhdGNoDQpJbmRleDogaW5jbHVkZS9NYWtlZmlsZS5h bQ0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9jdnNyb290L2NsYXNzcGF0aC9jbGFzc3BhdGgvaW5j bHVkZS9NYWtlZmlsZS5hbSx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNQ0KZGlmZiAtdSAtcjEu NSBNYWtlZmlsZS5hbQ0KLS0tIGluY2x1ZGUvTWFrZWZpbGUuYW0JNCBOb3YgMjAwMyAxMToyNDow OCAtMDAwMAkxLjUNCisrKyBpbmNsdWRlL01ha2VmaWxlLmFtCTI1IERlYyAyMDAzIDE3OjAyOjUz IC0wMDAwDQpAQCAtMSw1ICsxLDUgQEANCiBBUkdfSk5JX0pBVkFIID0gLWpuaQ0KLUFSR19DTEFT U1BBVEhfSkFWQUggPSAtY2xhc3NwYXRoDQorQVJHX0NMQVNTUEFUSF9KQVZBSCA9IC1ib290Y2xh c3NwYXRoDQogSkFWQUggPSAkKFVTRVJfSkFWQUgpICQoQVJHX0pOSV9KQVZBSCkgJChBUkdfQ0xB U1NQQVRIX0pBVkFIKSAuLi9saWI6JChVU0VSX0NMQVNTTElCKQ0KIA0KIEhfRklMRVMgPSBcDQpJ bmRleDogaW5jbHVkZS9nbnVfamF2YV9hd3RfcGVlcl9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BqYm9vbGVhbiBKTklDQUxMIEphdmFfamF2YV9sYW5nX1ZNU3lzdGVtX2lzV29yZHNC aWdFbmRpYW4gKEpOSUVudiAqZW52LCBqY2xhc3MpOw0KK2V4dGVybiBKTklFWFBPUlQgdm9pZCBK TklDQUxMIEphdmFfamF2YV9sYW5nX1ZNU3lzdGVtX3NldEluIChKTklFbnYgKmVudiwgamNsYXNz LCBqb2JqZWN0KTsNCitleHRlcm4gSk5JRVhQT1JUIHZvaWQgSk5JQ0FMTCBKYXZhX2phdmFfbGFu Z19WTVN5c3RlbV9zZXRPdXQgKEpOSUVudiAqZW52LCBqY2xhc3MsIGpvYmplY3QpOw0KK2V4dGVy biBKTklFWFBPUlQgdm9pZCBKTklDQUxMIEphdmFfamF2YV9sYW5nX1ZNU3lzdGVtX3NldEVyciAo Sk5JRW52ICplbnYsIGpjbGFzcywgam9iamVjdCk7DQorZXh0ZXJuIEpOSUVYUE9SVCBqbG9uZyBK TklDQUxMIEphdmFfamF2YV9sYW5nX1ZNU3lzdGVtX2N1cnJlbnRUaW1lTWlsbGlzIChKTklFbnYg KmVudiwgamNsYXNzKTsNCiANCiAjaWZkZWYgX19jcGx1c3BsdXMNCiB9DQo= --=-qXR7pLMaYOwEjafQJm1s-- --=-Fg1+UW+aTXO5kDZgFLwo Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/6xkPxVhZCJWr9QwRAiXrAJ4h3dmrtzCEZjG9jEFu4/d7+xP3+ACfXyYb CcCiLRyurp20k9c5uWB6VcI= =vch9 -----END PGP SIGNATURE----- --=-Fg1+UW+aTXO5kDZgFLwo-- From MAILER-DAEMON Thu Dec 25 21:44:38 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZhxt-0003xI-CR for mharc-commit-classpath@gnu.org; Thu, 25 Dec 2003 21:44:37 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZhxp-0003u0-IJ for commit-classpath@gnu.org; Thu, 25 Dec 2003 21:44:33 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZhxG-0003LK-18 for commit-classpath@gnu.org; Thu, 25 Dec 2003 21:44:29 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZhxD-0003Ey-Vl for commit-classpath@gnu.org; Thu, 25 Dec 2003 21:43:56 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZgzZ-0005L0-00 for ; Fri, 26 Dec 2003 02:42:17 +0100 From: Mark Wielaard To: commit-classpath@gnu.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-NaR0yOUv69E/N2H1jziD" Message-Id: <1072402945.23027.69.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 02:42:26 +0100 Subject: [PATCH] Sync gnu/java/rmi/server with kaffe (primitive types and void return values) X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 02:44:35 -0000 --=-NaR0yOUv69E/N2H1jziD Content-Type: multipart/mixed; boundary="=-TBHf+fg0gcpZoqdrrQEh" --=-TBHf+fg0gcpZoqdrrQEh Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, I am going to apply the following patch to resync with the kaffe version again. 2003-12-25 Guilhem Lavaux Mark Wielaard =20 * gnu/java/rmi/server/UnicastConnectionManager.java (startScavenger): Set the client connection manager to daemon state because it may block clients until TIMEOUT is reached when they are exiting. =20 * gnu/java/rmi/RMIVoidValue.java: New file for a class representing a void return. =20 * gnu/java/rmi/server/UnicastRemoteCall.java (DummyOutputStream): Add a boolean before each written field to know whether it is a primitive. (releaseOutputStream): Flush parameters at write time. =20 * gnu/java/rmi/server/UnicastServerRef.java (incomingMessageCall): Return a RMIVoidValue if no value is to be returned. =20 * gnu/java/rmi/server/UnicastServer.java (incomingMessageCall): Do not write a returned object if it is a RMIVoidValue. =20 * gnu/java/rmi/server/Makefile.am (EXTRA_DIST): Add RMIVoidValue.ja= va. Kaffe hackers, you may want to double check and resync with Classpath again since I slightly adapted the original patch by Guilhem to not create new Boolean and RMIVoidValue objects all over the place but reuse existing instances. Cheers, Mark --=-TBHf+fg0gcpZoqdrrQEh Content-Disposition: inline; filename=rmi_server.patch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name=rmi_server.patch; charset=ISO-8859-1 SW5kZXg6IGdudS9qYXZhL3JtaS9zZXJ2ZXIvTWFrZWZpbGUuYW0NCj09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBm aWxlOiAvY3Zzcm9vdC9jbGFzc3BhdGgvY2xhc3NwYXRoL2dudS9qYXZhL3JtaS9zZXJ2ZXIvTWFr ZWZpbGUuYW0sdg0KcmV0cmlldmluZyByZXZpc2lvbiAxLjINCmRpZmYgLXUgLXIxLjIgTWFrZWZp bGUuYW0NCi0tLSBnbnUvamF2YS9ybWkvc2VydmVyL01ha2VmaWxlLmFtCTIxIE1hciAyMDAyIDA1 OjQwOjExIC0wMDAwCTEuMg0KKysrIGdudS9qYXZhL3JtaS9zZXJ2ZXIvTWFrZWZpbGUuYW0JMjYg RGVjIDIwMDMgMDE6NDE6MTQgLTAwMDANCkBAIC03LDYgKzcsNyBAQA0KIFJNSUhhc2hlcy5qYXZh IFwNCiBSTUlPYmplY3RJbnB1dFN0cmVhbS5qYXZhIFwNCiBSTUlPYmplY3RPdXRwdXRTdHJlYW0u amF2YSBcDQorUk1JVm9pZFZhbHVlLmphdmEgXA0KIFVuaWNhc3RD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TsNCiAgICAgfQ0KIA0KICAgICBwdWJsaWMgdm9pZCB3cml0ZURvdWJsZShkb3Vi bGUgdikgdGhyb3dzIElPRXhjZXB0aW9uDQogICAgIHsNCisgICAgICB2ZWMuYWRkRWxlbWVudChC b29sZWFuLlRSVUUpOw0KICAgICAgIHZlYy5hZGRFbGVtZW50KG5ldyBEb3VibGUodikpOw0KICAg ICB9DQogDQogICAgIHB1YmxpYyB2b2lkIHdyaXRlRmxvYXQoZmxvYXQgdikgdGhyb3dzIElPRXhj ZXB0aW9uDQogICAgIHsNCisgICAgICB2ZWMuYWRkRWxlbWVudChCb29sZWFuLlRSVUUpOw0KICAg ICAgIHZlYy5hZGRFbGVtZW50KG5ldyBGbG9hdCh2KSk7DQogICAgIH0NCiANCiAgICAgcHVibGlj IHZvaWQgd3JpdGVJbnQoaW50IHYpIHRocm93cyBJT0V4Y2VwdGlvbg0KICAgICB7DQorICAgICAg dmVjLmFkZEVsZW1lbnQoQm9vbGVhbi5UUlVFKTsNCiAgICAgICB2ZWMuYWRkRWxlbWVudChuZXcg SW50ZWdlcih2KSk7DQogICAgIH0NCiANCiAgICAgcHVibGljIHZvaWQgd3JpdGVMb25nKGxvbmcg dikgdGhyb3dzIElPRXhjZXB0aW9uDQogICAgIHsNCisgICAgICB2ZWMuYWRkRWxlbWVudChCb29s ZWFuLlRSVUUpOw0KICAgICAgIHZlYy5hZGRFbGVtZW50KG5ldyBMb25nKHYpKTsNCiAgICAgfQ0K IA0KICAgICBwdWJsaWMgdm9pZCB3cml0ZVNob3J0KGludCB2KSB0aHJvd3MgSU9FeGNlcHRpb24N CiAgICAgew0KKyAgICAgIHZlYy5hZGRFbGVtZW50KEJvb2xlYW4uVFJVRSk7DQogICAgICAgdmVj LmFkZEVsZW1lbnQobmV3IFNob3J0KChzaG9ydCkgdikpOw0KICAgICB9DQogDQogICAgIHB1Ymxp YyB2b2lkIHdyaXRlT2JqZWN0KE9iamVjdCBvYmopIHRocm93cyBJT0V4Y2VwdGlv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; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/65IBxVhZCJWr9QwRAkoZAJwI9E0CI4xPQvEFD4wwC8wpu4vApACfSx1d ccPKKaV4uXdKkR6SL41FjJs= =iOUk -----END PGP SIGNATURE----- --=-NaR0yOUv69E/N2H1jziD-- From MAILER-DAEMON Fri Dec 26 08:24:57 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZrxY-0000BL-Ou for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 08:24:56 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZrxV-0000A5-Ma for commit-classpath@gnu.org; Fri, 26 Dec 2003 08:24:53 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZrvT-000800-9e for commit-classpath@gnu.org; Fri, 26 Dec 2003 08:23:18 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZrpN-0006ll-IG for commit-classpath@gnu.org; Fri, 26 Dec 2003 08:16:29 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZqrj-0006PU-00 for ; Fri, 26 Dec 2003 13:14:51 +0100 From: Mark Wielaard To: commit-classpath@gnu.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-GhNquHw1sgD4P0ViBbyT" Message-Id: <1072440900.23023.98.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 13:15:00 +0100 Subject: [PATCH] Update BufferedReader argument checking X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 13:24:54 -0000 --=-GhNquHw1sgD4P0ViBbyT Content-Type: multipart/mixed; boundary="=-ugzgSnSTKgMED+9FKyfP" --=-ugzgSnSTKgMED+9FKyfP Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, The following patch imports all the trivial argument checking parts of the changes the Guilhem made to BufferedReader for kaffe. I did not touch the mark() and readLine() logic changed. They still have to be checked. This just makes the diff between classpath and kaffe smaller. 2003-12-26 Guilhem Lavaux Mark Wielaard * java/io/BufferedReader.java (BufferedReader): Throw IllegalArgumentException when size <=3D 0. (mark): Document and better exception message for negative readLimit IllegalArgumentException. (read(char[],int,int)): Throw IndexOutOfBoundsException if offset an= d count are not valid regarding buf. (skip): Throw IllegalArgumentException when count is negative. I'll commit this now. Note to kaffe hackers: I made one documentation change and cleared up one exception message. You may want to resync with classpath again and then submit a patch for the logic changes. Cheers, Mark --=-ugzgSnSTKgMED+9FKyfP Content-Disposition: inline; filename=BufferedReader.patch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name=BufferedReader.patch; charset=ISO-8859-1 SW5kZXg6IGphdmEvaW8vQnVmZmVyZWRSZWFkZXIuamF2YQ0KPT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6 IC9jdnNyb290L2NsYXNzcGF0aC9jbGFzc3BhdGgvamF2YS9pby9CdWZmZXJlZFJlYWRlci5qYXZh LHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4xOQ0KZGlmZiAtdSAtcjEuMTkgQnVmZmVyZWRSZWFk ZXIuamF2YQ0KLS0tIGphdmEvaW8vQnVmZmVyZWRSZWFkZXIuamF2YQkxMSBKdW4gMjAwMyAxNzo1 NDoyOCAtMDAwMAkxLjE5DQorKysgamF2YS9pby9CdWZmZXJlZFJlYWRlci5qYXZhCTI2IERlYyAy MDAzIDEyOjE0OjA0IC0wMDAwDQpAQCAtMTA2LDEwICsxMDY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W50KSB0aHJvd3MgSU9FeGNlcHRpb24NCiAgIHsN CiAgICAgc3luY2hyb25pemVkIChsb2NrKQ0KICAgICAgIHsNCiAJY2hlY2tTdGF0dXMoKTsNCi0J aWYgKGNvdW50IDw9IDApDQorCWlmIChjb3VudCA8IDApDQorCSAgdGhyb3cgbmV3IElsbGVnYWxB cmd1bWVudEV4Y2VwdGlvbigic2tpcCB2YWx1ZSBpcyBuZWdhdGl2ZSIpOw0KKwlpZiAoY291bnQg PT0gMCkNCiAJICByZXR1cm4gMDsNCiAJLy8gWWV0IGFnYWluLCB3ZSBuZWVkIHRvIGhhbmRsZSB0 aGUgc3BlY2lhbCBjYXNlIG9mIGEgcmVhZExpbmUNCiAJLy8gdGhhdCBoYXMgYSAnXHInIGF0IHRo ZSBlbmQgb2YgdGhlIGJ1ZmZlci4gIEluIHRoaXMgY2FzZSwgd2UgbmVlZA0K --=-ugzgSnSTKgMED+9FKyfP-- --=-GhNquHw1sgD4P0ViBbyT Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/7CZExVhZCJWr9QwRAqL/AJ9F5EBCoUA6P+LU/4EQFVdMpy50QQCfQlhj xKvinbg23MTrfijsP7jJqrM= =H+qf -----END PGP SIGNATURE----- --=-GhNquHw1sgD4P0ViBbyT-- From MAILER-DAEMON Fri Dec 26 09:14:49 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZsjo-00060g-QA for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 09:14:48 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZsjm-0005zI-H9 for commit-classpath@gnu.org; Fri, 26 Dec 2003 09:14:46 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZsjE-0005dC-Fw for commit-classpath@gnu.org; Fri, 26 Dec 2003 09:14:43 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZsjE-0005ce-0h for commit-classpath@gnu.org; Fri, 26 Dec 2003 09:14:12 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZrla-0006We-00 for ; Fri, 26 Dec 2003 14:12:34 +0100 From: Mark Wielaard To: commit-classpath@gnu.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-s5wLPlD8tY4V2Ts/+Ad/" Message-Id: <1072444363.23028.103.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 14:12:44 +0100 Subject: [PATCH] Better FileInputStream constructor checks. X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 14:14:47 -0000 --=-s5wLPlD8tY4V2Ts/+Ad/ Content-Type: multipart/mixed; boundary="=-SI3rY079Nl9kQh+uA5dp" --=-SI3rY079Nl9kQh+uA5dp Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi all, Another small fix from kaffe: 2003-12-26 Guilhem Lavaux * java/io/FileInputStream.java (FileInputStream(String)): Call FileInputStream(File). (FileInputStream(File)): Check whether the argument is a directory. I am checking this in. Cheers, Mark --=-SI3rY079Nl9kQh+uA5dp Content-Disposition: inline; filename=FileInputStream.patch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name=FileInputStream.patch; charset=ISO-8859-1 SW5kZXg6IGphdmEvaW8vRmlsZUlucHV0U3RyZWFtLmphdmENCj09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBmaWxl OiAvY3Zzcm9vdC9jbGFzc3BhdGgvY2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CkpDQorICAgICAgdGhyb3cg bmV3IEZpbGVOb3RGb3VuZEV4Y2VwdGlvbihmaWxlLmdldFBhdGgoKSArICIgaXMgYSBkaXJlY3Rv cnkiKTsNCisNCisgICAgZmQgPSBuZXcgRmlsZURlc2NyaXB0b3IoZmlsZS5nZXRQYXRoKCksIEZp bGVEZXNjcmlwdG9yLlJFQUQpOw0KICAgfQ0KIA0KICAgLyoqDQo= --=-SI3rY079Nl9kQh+uA5dp-- --=-s5wLPlD8tY4V2Ts/+Ad/ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/7DPLxVhZCJWr9QwRAseqAJ0V3C4IraL+QuJ+nCs1yJpdhZyynACgoj7E OyYNzHg/flXPSkbFt0MHXTs= =C1QB -----END PGP SIGNATURE----- --=-s5wLPlD8tY4V2Ts/+Ad/-- From MAILER-DAEMON Fri Dec 26 10:24:06 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZtor-0006rJ-EK for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 10:24:05 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZtok-0006iM-G4 for commit-classpath@gnu.org; Fri, 26 Dec 2003 10:23:58 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZtoE-00064U-HQ for commit-classpath@gnu.org; Fri, 26 Dec 2003 10:23:57 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZtoE-00063G-2X for commit-classpath@gnu.org; Fri, 26 Dec 2003 10:23:26 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZsqa-0006df-00 for ; Fri, 26 Dec 2003 15:21:48 +0100 From: Mark Wielaard To: commit-classpath@gnu.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ldFlGNz0Mc06QmMbAOql" Message-Id: <1072448517.23027.112.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 15:21:58 +0100 Subject: [PATCH] Allow Socket.close() to be called multiple times X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 15:23:59 -0000 --=-ldFlGNz0Mc06QmMbAOql Content-Type: multipart/mixed; boundary="=-ZUfDbXl/KnPhXGMdKIah" --=-ZUfDbXl/KnPhXGMdKIah Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Small patch again from the kaffe hackers. 2003-12-26 Dalibor Topic * java/net/Socket.java (close): Allow a Socket to be closed multiple times without throwing an exception. I will commit this. Cheers, Mark --=-ZUfDbXl/KnPhXGMdKIah Content-Disposition: inline; filename=Socket.patch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name=Socket.patch; charset=ISO-8859-1 SW5kZXg6IGphdmEvbmV0L1NvY2tldC5qYXZhDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2N2c3Jv b3QvY2xhc3NwYXRoL2NsYXNzcGF0aC9qYXZhL25ldC9Tb2NrZXQuamF2YSx2DQpyZXRyaWV2aW5n IHJldmlzaW9uIDEuMzkNCmRpZmYgLXUgLXIxLjM5IFNvY2tldC5qYXZhDQotLS0gamF2YS9uZXQv U29ja2V0LmphdmEJMiBEZWMgMjAwMyAxNTo0MjozNCAtMDAwMAkxLjM5DQorKysgamF2YS9uZXQv U29ja2V0LmphdmEJMjYgRGVjIDIwMDMgMTQ6MjE6MjIgLTAwMDANCkBAIC0xMDAzLDcgKzEwMDMs NyBAQA0KICAgcHVibGljIHN5bmNocm9uaXplZCB2b2lkIGNsb3NlICgpICB0aHJvd3MgSU9FeGNl cHRpb24NCiAgIHsNCiAgICAgaWYgKGlzQ2xvc2VkKCkpDQotICAgICAgdGhyb3cgbmV3IFNvY2tl dEV4Y2VwdGlvbigic29ja2V0IGlzIGNsb3NlZCIpOw0KKyAgICAgIHJldHVybjsNCiAgICAgDQog ICAgIGdldEltcGwoKS5jbG9zZSgpOw0KICAgICBpbXBsID0gbnVsbDsNCg== --=-ZUfDbXl/KnPhXGMdKIah-- --=-ldFlGNz0Mc06QmMbAOql Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/7EQFxVhZCJWr9QwRAjbkAJ9CV3KNdIjFuHoqLP6s6BPPqHZ1uQCeNdNq zT9sbLgGTPWZPfI7gOOaO0o= =dhN7 -----END PGP SIGNATURE----- --=-ldFlGNz0Mc06QmMbAOql-- From MAILER-DAEMON Fri Dec 26 10:47:45 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZuBk-00051h-Py for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 10:47:44 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZuBi-000514-0E for commit-classpath@gnu.org; Fri, 26 Dec 2003 10:47:42 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZuAg-0004rj-7y for commit-classpath@gnu.org; Fri, 26 Dec 2003 10:47:09 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZuAE-0004Ub-RY for commit-classpath@gnu.org; Fri, 26 Dec 2003 10:46:10 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZtCb-0006g1-00 for ; Fri, 26 Dec 2003 15:44:33 +0100 From: Mark Wielaard To: commit-classpath@gnu.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-l4csb0jU2V7jehI2b4Y3" Message-Id: <1072449874.23023.119.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 15:44:42 +0100 Subject: [PATCH] java.rmi.Naming lookup, bind, rebind fixlet X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 15:47:42 -0000 --=-l4csb0jU2V7jehI2b4Y3 Content-Type: multipart/mixed; boundary="=-4GVGiEgDc6umzdmspQVO" --=-4GVGiEgDc6umzdmspQVO Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Another small fixlet from the Kaffe hackers: 2003-12-26 Guilhem Lavaux * java/rmi/Naming.java (lookup): Check if the first character of th= e filename returned by URL.getFile() is a '/', only if it is the case we cut this first character and call the registry with the good nam= e. (bind): Likewise. (rebind): Likewise. I will commit this. Cheers, Mark --=-4GVGiEgDc6umzdmspQVO Content-Disposition: inline; filename=rmi_naming.patch Content-Type: text/x-patch; name=rmi_naming.patch; charset=ISO-8859-1 Content-Transfer-Encoding: base64 SW5kZXg6IGphdmEvcm1pL05hbWluZy5qYXZhDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2N2c3Jv b3QvY2xhc3NwYXRoL2NsYXNzcGF0aC9qYXZhL3JtaS9OYW1pbmcuamF2YSx2DQpyZXRyaWV2aW5n IHJldmlzaW9uIDEuMw0KZGlmZiAtdSAtcjEuMyBOYW1pbmcuamF2YQ0KLS0tIGphdmEvcm1pL05h bWluZy5qYXZhCTEyIEF1ZyAyMDAzIDEyOjA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gQEANCiAgKi8NCiBwdWJsaWMgc3RhdGljIHZvaWQgcmViaW5kKFN0 cmluZyBuYW1lLCBSZW1vdGUgb2JqKSB0aHJvd3MgUmVtb3RlRXhjZXB0aW9uLCBNYWxmb3JtZWRV UkxFeGNlcHRpb24gew0KIAlVUkwgdSA9IG5ldyBVUkwoImh0dHA6IiArIG5hbWUpOw0KLQlnZXRS ZWdpc3RyeSh1KS5yZWJpbmQodS5nZXRGaWxlKCkuc3Vic3RyaW5nKDEpLCBvYmopOw0KKwlTdHJp bmcgZmlsZW5hbWUgPSB1LmdldEZpbGUoKTsNCisJLy8gSWYgdGhlIGZpbGVuYW1lIGJlZ2lucyB3 aXRoIGEgc2xhc2ggd2UgbXVzdCBjdXQgaXQgZm9yDQorCS8vIG5hbWUgcmVzb2x1dGlvbi4NCisJ aWYgKGZpbGVuYW1lLmNoYXJBdCgwKSA9PSAnLycpDQorCQlnZXRSZWdpc3RyeSh1KS5yZWJpbmQo ZmlsZW5hbWUuc3Vic3RyaW5nKDEpLCBvYmopOw0KKwllbHNlDQorCQlnZXRSZWdpc3RyeSh1KS5y ZWJpbmQoZmlsZW5hbWUsIG9iaik7DQogfQ0KIA0KIC8qKg0K --=-4GVGiEgDc6umzdmspQVO-- --=-l4csb0jU2V7jehI2b4Y3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/7ElRxVhZCJWr9QwRAh0eAJ0abwxRksYMjT/vNHcL+NSmeLZ6NQCdFwxB sfSuS2DqIVOnzdwPG9f6tY4= =ULoK -----END PGP SIGNATURE----- --=-l4csb0jU2V7jehI2b4Y3-- From MAILER-DAEMON Fri Dec 26 11:21:30 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZuiP-0002mk-WD for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 11:21:29 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZuiM-0002kU-Nt for commit-classpath@gnu.org; Fri, 26 Dec 2003 11:21:26 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZuhq-0001mX-63 for commit-classpath@gnu.org; Fri, 26 Dec 2003 11:21:25 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZuhp-0001kW-44; Fri, 26 Dec 2003 11:20:53 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZtk8-0006m4-00; Fri, 26 Dec 2003 16:19:12 +0100 From: Mark Wielaard To: Dalibor Topic , commit-classpath@gnu.org In-Reply-To: <3FC8F03C.7080506@kaffe.org> References: <1069431275.2861.580.camel@elsschot.wildebeest.org> <20031124225726.43635.qmail@maczuka.gcd.org> <1069791322.1303.41.camel@localhost> <20031127160147.485.qmail@maczuka.gcd.org> <3FC8F03C.7080506@kaffe.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-2lx3b1HkZe/XqSkgByM0" Message-Id: <1072451961.23026.124.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 16:19:21 +0100 Cc: Ito Kazumitsu , classpath@gnu.org, java-patches@gcc.gnu.org, kaffe@kaffe.org Subject: Re: GregorianCalendar fixes X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 16:21:27 -0000 --=-2lx3b1HkZe/XqSkgByM0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, On Sat, 2003-11-29 at 20:15, Dalibor Topic wrote: > after the discussion on the Classpath mailing list, I'd say it looks good= ;) >=20 > Mark, can I check it into Classpath's CVS with an updated ChangeLog entry= ? I'll check this in while I am resyncing with kaffe. There is only one functional change left between kaffe and classpath in computeFields(): @@ -606,7 +611,7 @@ calculateDay(++day, gregorian); } =20 - fields[DAY_OF_WEEK_IN_MONTH] =3D (fields[DAY_OF_MONTH] + 12) / 7; + fields[DAY_OF_WEEK_IN_MONTH] =3D (fields[DAY_OF_MONTH] + 6) / 7; =20 // which day of the week are we (0..6), relative to getFirstDayOfWeek int relativeWeekday =3D (7 + fields[DAY_OF_WEEK] - getFirstDayOfWeek()= ) % 7; Haven't looked at who is right here, so won't merge. > 2003-11-29 Guilhem Lavaux >=20 > * java/util/GregorianCalendar.java (computeTime): > 12:00 midnight is AM and 12:00 noon is PM. > [...] > > --- java/util/GregorianCalendar.java.orig Thu Nov 27 15:35:08 2003 > > +++ java/util/GregorianCalendar.java Thu Nov 27 15:48:25 2003 > > @@ -402,7 +402,11 @@ > > { > > hour =3D fields[HOUR]; > > if (isSet[AM_PM] && fields[AM_PM] =3D=3D PM) > > - hour +=3D 12; > > + if (hour !=3D 12) /* not Noon */ > > + hour +=3D 12; > > + /* Fix the problem of the status of 12:00 AM (midnight). */ > > + if (isSet[AM_PM] && fields[AM_PM] =3D=3D AM && hour =3D=3D 12) > > + hour =3D 0; > > } > > =20 > > int minute =3D isSet[MINUTE] ? fields[MINUTE] : 0; Cheers, Mark --=-2lx3b1HkZe/XqSkgByM0 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/7FF5xVhZCJWr9QwRAkVGAJ9oFvVK+g5BxVY9gL7L7ixbgYDStwCfSOEL k0QYzxWCR+kRzyFjxO4MuT8= =P+/c -----END PGP SIGNATURE----- --=-2lx3b1HkZe/XqSkgByM0-- From MAILER-DAEMON Fri Dec 26 12:45:54 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZw26-0006oP-0I for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 12:45:54 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZw1z-0006m4-Tw for commit-classpath@gnu.org; Fri, 26 Dec 2003 12:45:47 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZw1M-0006cr-JZ for commit-classpath@gnu.org; Fri, 26 Dec 2003 12:45:39 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AZw1K-0006R0-3z for commit-classpath@gnu.org; Fri, 26 Dec 2003 12:45:06 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1AZuzU-00015a-Q8 for commit-classpath@gnu.org; Fri, 26 Dec 2003 11:39:08 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQGd5w1020282 for ; Fri, 26 Dec 2003 17:39:06 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZv2e-0001sC-00 for ; Fri, 26 Dec 2003 17:42:24 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 17:42:08 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_gTG7/XER6Ldf+rb" Message-Id: <200312261742.08840.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.awt merge with libgcj X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 17:45:50 -0000 --Boundary-00=_gTG7/XER6Ldf+rb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge some java.awt stuff from libgcj. Michael --Boundary-00=_gTG7/XER6Ldf+rb Content-Type: text/x-diff; charset="us-ascii"; name="awt.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="awt.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1697 diff -u -b -B -r1.1697 ChangeLog --- ChangeLog 26 Dec 2003 15:32:30 -0000 1.1697 +++ ChangeLog 26 Dec 2003 16:36:06 -0000 @@ -1,5 +1,13 @@ 2003-12-26 Michael Koch + * java/awt/MenuComponent.java: Import java.io.Serialization. + * java/awt/MenuItem.java: Likewise. + * java/awt/TextComponent.java: Likewise. + * java/awt/image/ImagingOpException.java + (serialVersionUID): Fixed. + +2003-12-26 Michael Koch + * javax/print/attribute/AttributeSetUtilities.java, javax/print/attribute/DateTimeSyntax.java, javax/print/attribute/DocAttribute.java, Index: java/awt/image/ImagingOpException.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/image/ImagingOpException.java,v retrieving revision 1.1 diff -u -b -B -r1.1 ImagingOpException.java --- java/awt/image/ImagingOpException.java 24 Feb 2002 04:25:16 -0000 1.1 +++ java/awt/image/ImagingOpException.java 26 Dec 2003 16:36:06 -0000 @@ -1,5 +1,5 @@ /* ImagingOpException.java -- indicates an imaging filter failure - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -52,7 +52,7 @@ /** * Compatible with JDK 1.0+. */ - private static final long serialVersionUID = 96598996116164315L; + private static final long serialVersionUID = 8026288481846276658L; /** * Create a new instance with a descriptive error message. Index: java/awt/MenuComponent.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/MenuComponent.java,v retrieving revision 1.13 diff -u -b -B -r1.13 MenuComponent.java --- java/awt/MenuComponent.java 2 Mar 2003 19:28:14 -0000 1.13 +++ java/awt/MenuComponent.java 26 Dec 2003 16:36:06 -0000 @@ -1,5 +1,5 @@ /* MenuComponent.java -- Superclass of all AWT menu components - Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -39,6 +39,7 @@ package java.awt; import java.awt.peer.MenuComponentPeer; +import java.io.Serializable; // FIXME: Java 1.0 event model unimplemented @@ -47,7 +48,7 @@ * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public abstract class MenuComponent implements java.io.Serializable +public abstract class MenuComponent implements Serializable { /* Index: java/awt/MenuItem.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/MenuItem.java,v retrieving revision 1.10 diff -u -b -B -r1.10 MenuItem.java --- java/awt/MenuItem.java 3 Jun 2003 16:40:37 -0000 1.10 +++ java/awt/MenuItem.java 26 Dec 2003 16:36:06 -0000 @@ -1,5 +1,5 @@ /* MenuItem.java -- An item in a menu - Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,6 +41,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.peer.MenuItemPeer; +import java.io.Serializable; import java.lang.reflect.Array; import java.util.EventListener; @@ -49,7 +50,8 @@ * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public class MenuItem extends MenuComponent implements java.io.Serializable +public class MenuItem extends MenuComponent + implements Serializable { // FIXME: The enabled event mask is not used at this time. Index: java/awt/TextComponent.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/TextComponent.java,v retrieving revision 1.11 diff -u -b -B -r1.11 TextComponent.java --- java/awt/TextComponent.java 1 Dec 2003 20:19:21 -0000 1.11 +++ java/awt/TextComponent.java 26 Dec 2003 16:36:06 -0000 @@ -1,5 +1,5 @@ /* TextComponent.java -- Widgets for entering text - Copyright (C) 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,6 +42,7 @@ import java.awt.event.TextListener; import java.awt.peer.TextComponentPeer; import java.awt.peer.ComponentPeer; +import java.io.Serializable; import java.util.EventListener; /** @@ -50,7 +51,8 @@ * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public class TextComponent extends Component implements java.io.Serializable +public class TextComponent extends Component + implements Serializable { /* --Boundary-00=_gTG7/XER6Ldf+rb-- From MAILER-DAEMON Fri Dec 26 12:54:49 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZwAj-0000wA-1y for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 12:54:49 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZwAg-0000vQ-MP for commit-classpath@gnu.org; Fri, 26 Dec 2003 12:54:46 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZw8K-0000Cx-V5 for commit-classpath@gnu.org; Fri, 26 Dec 2003 12:52:53 -0500 Received: from [212.6.122.116] (helo=mail2.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZw8J-0000Bt-96 for commit-classpath@gnu.org; Fri, 26 Dec 2003 12:52:19 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail2.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQGokUa027416 for ; Fri, 26 Dec 2003 17:50:46 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZvDw-0001sb-00 for ; Fri, 26 Dec 2003 17:54:04 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 17:53:49 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_deG7/BH/bFnpdhO" Message-Id: <200312261753.49297.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.awt.Polygon X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 17:54:47 -0000 --Boundary-00=_deG7/BH/bFnpdhO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge a little fix from libgcj. Michael --Boundary-00=_deG7/BH/bFnpdhO Content-Type: text/x-diff; charset="us-ascii"; name="poly.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="poly.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1698 diff -u -b -B -r1.1698 ChangeLog --- ChangeLog 26 Dec 2003 16:37:27 -0000 1.1698 +++ ChangeLog 26 Dec 2003 16:48:09 -0000 @@ -1,3 +1,9 @@ +2003-12-26 Olga Rodimina + + * java/awt/Polygon.java (translate): + Fixed error that caused polygon to move right/left + when up/down translation was required. + 2003-12-26 Michael Koch * java/awt/MenuComponent.java: Import java.io.Serialization. Index: java/awt/Polygon.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Polygon.java,v retrieving revision 1.6 diff -u -b -B -r1.6 Polygon.java --- java/awt/Polygon.java 21 Mar 2002 07:58:00 -0000 1.6 +++ java/awt/Polygon.java 26 Dec 2003 16:48:09 -0000 @@ -185,7 +185,7 @@ while (--i >= 0) { xpoints[i] += dx; - xpoints[i] += dy; + ypoints[i] += dy; } if (bounds != null) { --Boundary-00=_deG7/BH/bFnpdhO-- From MAILER-DAEMON Fri Dec 26 13:27:21 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZwgD-0003ak-5I for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 13:27:21 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZwg9-0003T1-92 for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:27:17 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZwfa-0002Oo-L1 for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:27:14 -0500 Received: from [212.6.122.141] (helo=mail4.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZwfZ-0002LO-GC for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:26:41 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail4.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQHPCHA013952 for ; Fri, 26 Dec 2003 18:25:13 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZvlH-00022O-00 for ; Fri, 26 Dec 2003 18:28:31 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 18:28:15 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_v+G7/q6VmzvuHOv" Message-Id: <200312261828.15925.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.awt.FlowLayout X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 18:27:18 -0000 --Boundary-00=_v+G7/q6VmzvuHOv Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge a fix by Thomas Fitzsimmons in libgcj. Michael --Boundary-00=_v+G7/q6VmzvuHOv Content-Type: text/x-diff; charset="us-ascii"; name="layout.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="layout.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1701 diff -u -b -B -r1.1701 ChangeLog --- ChangeLog 26 Dec 2003 17:09:17 -0000 1.1701 +++ ChangeLog 26 Dec 2003 17:16:09 -0000 @@ -1,3 +1,8 @@ +2003-12-26 Thomas Fitzsimmons + + * java/awt/FlowLayout.java (layoutContainer): Let components + assume their preferred height. Centre components vertically. + 2003-12-26 Fernando Nasser * java/awt/List.java (replaceItem): Prevent selection to move with Index: java/awt/FlowLayout.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/FlowLayout.java,v retrieving revision 1.10 diff -u -b -B -r1.10 FlowLayout.java --- java/awt/FlowLayout.java 8 Oct 2003 23:40:49 -0000 1.10 +++ java/awt/FlowLayout.java 26 Dec 2003 17:16:09 -0000 @@ -214,7 +214,8 @@ if (comps[k].visible) { Dimension c = comps[k].getPreferredSize (); - comps[k].setBounds (x, y, c.width, new_h); + comps[k].setBounds (x, y + (new_h - c.height) / 2, + c.width, c.height); x += c.width + hgap; } } --Boundary-00=_v+G7/q6VmzvuHOv-- From MAILER-DAEMON Fri Dec 26 13:28:22 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZwhC-0004Ri-6t for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 13:28:22 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZwh9-0004OW-Jb for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:28:19 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZwgd-00040E-Fs for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:28:18 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZwgd-0003yy-0T for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:27:47 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQHQIw1011405 for ; Fri, 26 Dec 2003 18:26:19 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZvmL-00022U-00 for ; Fri, 26 Dec 2003 18:29:37 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 18:29:21 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_x/G7/X+GDPKNb1q" Message-Id: <200312261829.21777.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.awt.image.PixelGrabber X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 18:28:20 -0000 --Boundary-00=_x/G7/X+GDPKNb1q Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I comited the attached patch to merge fixes by Thomas Fitzsimmons in libgcj. Michael --Boundary-00=_x/G7/X+GDPKNb1q Content-Type: text/x-diff; charset="us-ascii"; name="grab.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="grab.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1702 diff -u -b -B -r1.1702 ChangeLog --- ChangeLog 26 Dec 2003 17:16:40 -0000 1.1702 +++ ChangeLog 26 Dec 2003 17:20:55 -0000 @@ -1,5 +1,9 @@ 2003-12-26 Thomas Fitzsimmons + * java/awt/image/PixelGrabber.java: + Fix implementation and update javadocs. +2003-12-26 Thomas Fitzsimmons + * java/awt/FlowLayout.java (layoutContainer): Let components assume their preferred height. Centre components vertically. Index: java/awt/image/PixelGrabber.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/image/PixelGrabber.java,v retrieving revision 1.8 diff -u -b -B -r1.8 PixelGrabber.java --- java/awt/image/PixelGrabber.java 1 Dec 2003 17:23:17 -0000 1.8 +++ java/awt/image/PixelGrabber.java 26 Dec 2003 17:20:55 -0000 @@ -520,12 +520,16 @@ { ints_delivered = true; + assert (i >= 0 && i < int_pixel_buffer.length); + assert (p >= 0 && p < pixels.length); int_pixel_buffer[i] = currentModel.getRGB (pixels[p]); } else { bytes_delivered = true; + assert (i >= 0 && i < byte_pixel_buffer.length); + assert (p >= 0 && p < pixels.length); byte_pixel_buffer[i] = pixels[p]; } } @@ -578,6 +582,8 @@ { int i = (yp - this.y) * this.scansize + (xp - this.x) + this.offset; int p = (yp - y) * scansize + (xp - x) + offset; + assert (i >= 0 && i < int_pixel_buffer.length); + assert (p >= 0 && p < pixels.length); if (forceRGB) int_pixel_buffer[i] = currentModel.getRGB (pixels[p]); else --Boundary-00=_x/G7/X+GDPKNb1q-- From MAILER-DAEMON Fri Dec 26 13:29:06 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZwhu-0004v3-Dj for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 13:29:06 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZwhq-0004s5-Da for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:29:02 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZwhF-0004Sv-IG for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:28:56 -0500 Received: from [212.6.122.141] (helo=mail4.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZwhE-0004SR-SO for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:28:24 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail4.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQHQuHA014378 for ; Fri, 26 Dec 2003 18:26:57 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZvmx-00022a-00 for ; Fri, 26 Dec 2003 18:30:15 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 18:29:59 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_XAH7/Qh0Dt1hKw3" Message-Id: <200312261829.59737.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.awt.List fix X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 18:29:03 -0000 --Boundary-00=_XAH7/Qh0Dt1hKw3 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge a fix by Fernando Nasser in libgcj. Michael --Boundary-00=_XAH7/Qh0Dt1hKw3 Content-Type: text/x-diff; charset="us-ascii"; name="list.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="list.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1700 diff -u -b -B -r1.1700 ChangeLog --- ChangeLog 26 Dec 2003 16:55:53 -0000 1.1700 +++ ChangeLog 26 Dec 2003 17:08:48 -0000 @@ -1,3 +1,8 @@ +2003-12-26 Fernando Nasser + + * java/awt/List.java (replaceItem): Prevent selection to move with + replace and minimize flickering. + 2003-12-26 Michael Koch * native/target/generic/target_generic_file.h Index: java/awt/List.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/List.java,v retrieving revision 1.16 diff -u -b -B -r1.16 List.java --- java/awt/List.java 3 Dec 2003 08:20:04 -0000 1.16 +++ java/awt/List.java 26 Dec 2003 17:08:48 -0000 @@ -647,8 +647,21 @@ public synchronized void replaceItem(String item, int index) throws IllegalArgumentException { - remove(index); - addItem(item, index); + if ((index < 0) || (index >= items.size())) + throw new IllegalArgumentException("Bad list index: " + index); + + items.insertElementAt(item, index + 1); + items.removeElementAt (index); + + if (peer != null) + { + ListPeer l = (ListPeer) peer; + + /* We add first and then remove so that the selected + item remains the same */ + l.add (item, index + 1); + l.delItems (index, index); + } } /*************************************************************************/ --Boundary-00=_XAH7/Qh0Dt1hKw3-- From MAILER-DAEMON Fri Dec 26 13:29:46 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZwiX-0005GA-VX for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 13:29:45 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZwiU-0005D2-JD for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:29:42 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZwhw-0004xH-Jm for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:29:40 -0500 Received: from [212.6.122.126] (helo=mail3.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZwhv-0004w7-Px for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:29:07 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail3.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQHRd1h004761 for ; Fri, 26 Dec 2003 18:27:39 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZvne-00022g-00 for ; Fri, 26 Dec 2003 18:30:58 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 18:30:42 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_CBH7/2Q01harOcn" Message-Id: <200312261830.42465.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: O_SYNC and O_FSYNC X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 18:29:44 -0000 --Boundary-00=_CBH7/2Q01harOcn Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to fix handling of file synchonization on BSD derived OS'. This patch is derived from work done in libgcj. Michael --Boundary-00=_CBH7/2Q01harOcn Content-Type: text/x-diff; charset="us-ascii"; name="sync.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sync.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1699 diff -u -b -B -r1.1699 ChangeLog --- ChangeLog 26 Dec 2003 16:49:32 -0000 1.1699 +++ ChangeLog 26 Dec 2003 16:54:13 -0000 @@ -1,3 +1,9 @@ +2003-12-26 Michael Koch + + * native/target/generic/target_generic_file.h + (TARGET_NATIVE_FILE_FILEFLAG_SYNC): Define to O_FSYNC on systems where + O_SYNC doesnt exist but O_FSYNC does (like FreeBSD). + 2003-12-26 Olga Rodimina * java/awt/Polygon.java (translate): Index: native/target/generic/target_generic_file.h =================================================================== RCS file: /cvsroot/classpath/classpath/native/target/generic/target_generic_file.h,v retrieving revision 1.11 diff -u -b -B -r1.11 target_generic_file.h --- native/target/generic/target_generic_file.h 2 Nov 2003 15:51:19 -0000 1.11 +++ native/target/generic/target_generic_file.h 26 Dec 2003 16:54:13 -0000 @@ -90,7 +90,11 @@ #define TARGET_NATIVE_FILE_FILEFLAG_APPEND O_APPEND #endif #ifndef TARGET_NATIVE_FILE_FILEFLAG_SYNC + #if !defined (O_SYNC) && defined (O_FSYNC) + #define TARGET_NATIVE_FILE_FILEFLAG_SYNC O_FSYNC + #else #define TARGET_NATIVE_FILE_FILEFLAG_SYNC O_SYNC + #endif #endif #ifndef TARGET_NATIVE_FILE_FILEFLAG_DSYNC #ifdef O_DSYNC --Boundary-00=_CBH7/2Q01harOcn-- From MAILER-DAEMON Fri Dec 26 13:45:54 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZwy9-00031o-Gn for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 13:45:53 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZwy6-00030K-0G for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:45:50 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZwxJ-0002T0-V4 for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:45:34 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AZwxJ-0002Ln-C8 for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:45:01 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by mx20.gnu.org with esmtp (Exim 4.24) id 1AZvwu-0003Ya-83 for commit-classpath@gnu.org; Fri, 26 Dec 2003 12:40:32 -0500 Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZvwi-000712-00 for ; Fri, 26 Dec 2003 18:40:20 +0100 From: Mark Wielaard To: commit-classpath@gnu.org In-Reply-To: <200312261829.21777.konqueror@gmx.de> References: <200312261829.21777.konqueror@gmx.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-c55T0GyqadO0hRgaOiq8" Message-Id: <1072460429.23020.164.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 18:40:29 +0100 Subject: Re: FYI: Patch: java.awt.image.PixelGrabber X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 18:45:51 -0000 --=-c55T0GyqadO0hRgaOiq8 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, On Fri, 2003-12-26 at 18:29, Michael Koch wrote: > I comited the attached patch to merge fixes by Thomas Fitzsimmons in libg= cj. The attached ChangeLog entry and the actual code do not seem to match up. The ChangeLog entry says: + * java/awt/image/PixelGrabber.java: + Fix implementation and update javadocs. But the actual diff only lists some added asserts. Could you double check this patch? Thanks, Mark --=-c55T0GyqadO0hRgaOiq8 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/7HKNxVhZCJWr9QwRAmbbAJ4yZTKsrLgjFZ//9ZpCIZRnTTRwLACfQxfE uM5F1Z+jG5TzYp2/fCVGl0c= =CTcq -----END PGP SIGNATURE----- --=-c55T0GyqadO0hRgaOiq8-- From MAILER-DAEMON Fri Dec 26 13:55:42 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZx7d-0008QA-QK for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 13:55:41 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZx7a-0008Of-0k for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:55:38 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZx5x-0006lz-5v for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:54:31 -0500 Received: from [212.6.122.141] (helo=mail4.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZx5n-0006k9-Df for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:53:47 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail4.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQHqJHA021408 for ; Fri, 26 Dec 2003 18:52:19 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZwBW-00025O-00 for ; Fri, 26 Dec 2003 18:55:38 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 18:55:22 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_KYH7/5+hDARbYt1" Message-Id: <200312261855.22140.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.awt.datatransfer fixes X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 18:55:38 -0000 --Boundary-00=_KYH7/5+hDARbYt1 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to fix issues in java.awt.datatransfer fixed by Fernando Nasser in libgcj. Michael --Boundary-00=_KYH7/5+hDARbYt1 Content-Type: text/x-diff; charset="us-ascii"; name="data.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="data.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1703 diff -u -b -B -r1.1703 ChangeLog --- ChangeLog 26 Dec 2003 17:23:53 -0000 1.1703 +++ ChangeLog 26 Dec 2003 17:48:23 -0000 @@ -1,3 +1,11 @@ +2003-12-26 Fernando Nasser + + * java/awt/datatransfer/DataFlavor.java (getParameter): + Fix off-by-one error which was clipping off the first character of a + parameter value. + * java/awt/datatransfer/StringSelection.java (getTransferData): + Return object of type expected by specified DataFlavor. + 2003-12-26 Thomas Fitzsimmons * java/awt/image/PixelGrabber.java: Index: java/awt/datatransfer/DataFlavor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/datatransfer/DataFlavor.java,v retrieving revision 1.17 diff -u -b -B -r1.17 DataFlavor.java --- java/awt/datatransfer/DataFlavor.java 15 Nov 2003 22:41:37 -0000 1.17 +++ java/awt/datatransfer/DataFlavor.java 26 Dec 2003 17:48:24 -0000 @@ -459,7 +459,7 @@ if (idx == -1) return(null); - String value = mimeString.substring(idx + paramName.length() + 2); + String value = mimeString.substring(idx + paramName.length() + 1); idx = value.indexOf(" "); if (idx == -1) Index: java/awt/datatransfer/StringSelection.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/datatransfer/StringSelection.java,v retrieving revision 1.5 diff -u -b -B -r1.5 StringSelection.java --- java/awt/datatransfer/StringSelection.java 23 Jun 2003 12:53:47 -0000 1.5 +++ java/awt/datatransfer/StringSelection.java 26 Dec 2003 17:48:24 -0000 @@ -38,7 +38,7 @@ package java.awt.datatransfer; -import java.io.StringBufferInputStream; +import java.io.StringReader; import java.io.IOException; /** @@ -140,7 +140,15 @@ if (!isDataFlavorSupported(flavor)) throw new UnsupportedFlavorException(flavor); - return(new StringBufferInputStream(data)); + if (DataFlavor.plainTextFlavor == flavor) + /* The behavior of this method for DataFlavor.plainTextFlavor and + equivalent DataFlavors is inconsistent with the definition of + DataFlavor.plainTextFlavor. We choose to do like Sun's implementation + and return a Reader instead of an InputString. */ + /* return(new StringBufferInputStream(data)); */ + return(new StringReader(data)); + else // DataFlavor.stringFlavor + return data; } /*************************************************************************/ --Boundary-00=_KYH7/5+hDARbYt1-- From MAILER-DAEMON Fri Dec 26 14:10:39 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZxM6-0004co-Ho for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 14:10:38 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZxM1-0004Wx-8o for commit-classpath@gnu.org; Fri, 26 Dec 2003 14:10:33 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZxLL-0003e2-4Y for commit-classpath@gnu.org; Fri, 26 Dec 2003 14:10:23 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AZxLJ-0003CF-0l for commit-classpath@gnu.org; Fri, 26 Dec 2003 14:09:49 -0500 Received: from [212.6.122.126] (helo=mail3.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1AZwH5-0004R9-AQ for commit-classpath@gnu.org; Fri, 26 Dec 2003 13:01:23 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail3.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQI1D1h017958; Fri, 26 Dec 2003 19:01:14 +0100 (MET) Received: from mkoch by majestix.konqueror.de with local (Exim 3.35 #1 (Debian)) id 1AZwK8-0002CI-00; Fri, 26 Dec 2003 19:04:32 +0100 Date: Fri, 26 Dec 2003 19:04:32 +0100 From: Michael Koch To: Mark Wielaard Message-ID: <20031226180432.GA6669@mail.konqueror.de> References: <200312261829.21777.konqueror@gmx.de> <1072460429.23020.164.camel@elsschot.wildebeest.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1072460429.23020.164.camel@elsschot.wildebeest.org> User-Agent: Mutt/1.3.28i Sender: Michael Koch X-CheckCompat: OK Cc: commit-classpath@gnu.org Subject: Re: FYI: Patch: java.awt.image.PixelGrabber X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 19:10:35 -0000 On Fri, Dec 26, 2003 at 06:40:29PM +0100, Mark Wielaard wrote: > Hi, > > On Fri, 2003-12-26 at 18:29, Michael Koch wrote: > > I comited the attached patch to merge fixes by Thomas Fitzsimmons in libgcj. > > The attached ChangeLog entry and the actual code do not seem to match > up. The ChangeLog entry says: > > + * java/awt/image/PixelGrabber.java: > + Fix implementation and update javadocs. > > But the actual diff only lists some added asserts. > Could you double check this patch? Thx for catching this. I relied too much on the cvs changelog of libgcj. The patch was already merged, without the assert. The reason for this is not documentated in the archive. At least I dont found it. Should I just rework the changelog entry or what is your preferred solution for this ? Michael From MAILER-DAEMON Fri Dec 26 14:20:51 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZxVz-0003AG-DF for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 14:20:51 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZxVv-00038V-Po for commit-classpath@gnu.org; Fri, 26 Dec 2003 14:20:47 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZxVP-0002tQ-2d for commit-classpath@gnu.org; Fri, 26 Dec 2003 14:20:46 -0500 Received: from [219.160.177.9] (helo=asao.gcd.org) by monty-python.gnu.org with smtp (Exim 4.24) id 1AZxVN-0002su-Uf for commit-classpath@gnu.org; Fri, 26 Dec 2003 14:20:14 -0500 Received: (qmail 9785 invoked by uid 10); 27 Dec 2003 03:18:43 +0900 Received: (qmail 39008 invoked by uid 1000); 26 Dec 2003 18:18:05 -0000 Message-ID: <20031226181805.39007.qmail@maczuka.gcd.org> From: Ito Kazumitsu To: Mark Wielaard In-reply-to: Your message of "Fri, 26 Dec 2003 16:19:21 +0100" References: <1069431275.2861.580.camel@elsschot.wildebeest.org> <20031124225726.43635.qmail@maczuka.gcd.org> <1069791322.1303.41.camel@localhost> <20031127160147.485.qmail@maczuka.gcd.org> <3FC8F03C.7080506@kaffe.org> <1072451961.23026.124.camel@elsschot.wildebeest.org> User-Agent: EMH/1.10.0 SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.2 (i386-unknown-freebsd4.7) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=ISO-8859-4 Content-Transfer-Encoding: quoted-printable Date: Sat, 27 Dec 2003 03:18:05 +0900 Sender: kaz@maczuka.gcd.org Cc: Dalibor Topic , classpath@gnu.org, Ito Kazumitsu , commit-classpath@gnu.org, java-patches@gcc.gnu.org, kaffe@kaffe.org Subject: Re: [kaffe] Re: GregorianCalendar fixes X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 19:20:48 -0000 Hi, >>>>> ":" =3D=3D Mark Wielaard writes: :> There is only one functional change left between kaffe and classpath in :> computeFields(): :> - fields[DAY_OF_WEEK_IN_MONTH] =3D (fields[DAY_OF_MONTH] + 12) / 7; :> + fields[DAY_OF_WEEK_IN_MONTH] =3D (fields[DAY_OF_MONTH] + 6) / 7; :> Haven't looked at who is right here, so won't merge. This change about DAY_OF_WEEK_IN_MONTH was in Mark's patch [1] (see below) but was not in my original patch [2] (see below) posted to the kaffe mailing list. This patch seemes to have been introduced by analogy with the patch about WEEK_OF_MONTH.=20 But Sun's API document says: Unlike WEEK_OF_MONTH and WEEK_OF_YEAR, this field's value does not depend on getFirstDayOfWeek() or getMinimalDaysInFirstWeek(). DAY_OF_MONTH 1 through 7 always correspond to DAY_OF_WEEK_IN_MONTH 1; 8 through 14 correspond to DAY_OF_WEEK_IN_MONTH 2, and so on. In this respect, fields[DAY_OF_WEEK_IN_MONTH] =3D (fields[DAY_OF_MONTH] + 6) / 7; seems to be correct. [1]=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D From: Mark Wielaard To: classpath@gnu.org, kaffe@kaffe.org Message-Id: <1069431275.2861.580.camel@elsschot.wildebeest.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5=20 Date: Fri, 21 Nov 2003 17:14:35 +0100 Cc: java-patches@gcc.gnu.org Subject: GregorianCalendar fixes X-BeenThere: classpath@gnu.org X-Mailman-Version: 2.1.2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , [1 ] [1.1 ] [1.1.1 ] Hi, Since I am not a GregorianCalendar expert I was hoping that someone could review the following patch which I have in my tree from Ito Kazumitsu. He and I wrote a couple of mauve test cases which are fixed by this and I see no new failures. But people didn't seem to be completely comfortable with it back in Augustus/September. It would be nice if we could create even more test cases to make sure that nothing else breaks and to have a ChangeLog entry for this patch (Ito?). Don't really have have time to learn about Calendars so I am just re-posting this patch in the hope that someone can review it. Thanks, Mark [1.1.2 GregorianCalendar.patch ] Index: java/util/GregorianCalendar.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/classpath/classpath/java/util/GregorianCalendar.java,v retrieving revision 1.20 diff -u -r1.20 GregorianCalendar.java --- java/util/GregorianCalendar.java 12 Aug 2003 13:41:27 -0000 1.20 +++ java/util/GregorianCalendar.java 21 Nov 2003 16:11:56 -0000 @@ -1,5 +1,5 @@ /* java.util.GregorianCalendar - Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, In= c. =20 This file is part of GNU Classpath. =20 @@ -264,8 +264,10 @@ // // The additional leap year factor accounts for the fact that // a leap day is not seen on Jan 1 of the leap year. + // And on and after the leap day, the leap day has already been + // included in dayOfYear.=20 int gregOffset =3D (year / 400) - (year / 100) + 2; - if (isLeapYear (year, true) && dayOfYear < 31 + 29) + if (isLeapYear (year, true)) --gregOffset; time +=3D gregOffset * (24 * 60 * 60 * 1000L); } @@ -604,12 +606,12 @@ calculateDay(++day, gregorian); } =20 - fields[DAY_OF_WEEK_IN_MONTH] =3D (fields[DAY_OF_MONTH] + 6) / 7; + fields[DAY_OF_WEEK_IN_MONTH] =3D (fields[DAY_OF_MONTH] + 12) / 7; =20 // which day of the week are we (0..6), relative to getFirstDayOfWeek int relativeWeekday =3D (7 + fields[DAY_OF_WEEK] - getFirstDayOfWeek()= ) % 7; =20 - fields[WEEK_OF_MONTH] =3D (fields[DAY_OF_MONTH] - relativeWeekday + 6)= / 7; + fields[WEEK_OF_MONTH] =3D (fields[DAY_OF_MONTH] - relativeWeekday + 12= ) / 7; =20 int weekOfYear =3D (fields[DAY_OF_YEAR] - relativeWeekday + 6) / 7; =20 [1.2 This is a digitally signed message part ] [2 ] _______________________________________________ Classpath mailing list Classpath@gnu.org http://mail.gnu.org/mailman/listinfo/classpath [2]=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D From: Ito Kazumitsu To: kaffe@kaffe.org In-reply-to: Ito Kazumitsu's message of "Mon, 28 Jul 2003 10:46:11 +0900" <= 200307280146.h6S1kBq16305@sm1.hitachi-cable.co.jp> Subject: Re: [kaffe] Bug in Kaffe 1.0.7 User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory=F2mae) APEL/10.3 Emacs/20.7 (i386-*-windows98.2222) MULE/4.1 (AOI) Meadow/1.14 (AWSAKA:62) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") X-BeenThere: kaffe@kaffe.org X-Mailman-Version: 2.0.11 List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: X-Original-Date: Mon, 28 Jul 2003 13:31:38 +0900 Date: Mon, 28 Jul 2003 13:31:38 +0900 In message "Re: [kaffe] Bug in Kaffe 1.0.7" on 03/07/28, Ito Kazumitsu writes: > The attached program prints week-related values for the dates > from Jan 1 2000 to Dec 31 2003. Both GNU Classpath and Sun's > JDK give identical results for the following months: >=20 > Oct 2000, Apr 2001, Jul 2001, Sep 2002, Dec 2002, Jun 2003 These months are special in that the first day of the month is Sunday. The attached patch makes GNU classpath's java.util.Calendar behave almost similarly to Sun's JDK except that the former returns 53 or 54 as the last week of the year but the latter returns 1. I think that returning 1 as the last week of the year may be a bug of Sun's JDK. I will submit this patch to the GNU Classpath mailing list. --- java/util/GregorianCalendar.java.orig Sun Mar 24 01:10:15 2002 +++ java/util/GregorianCalendar.java Mon Jul 28 11:53:16 2003 @@ -599,7 +599,7 @@ // which day of the week are we (0..6), relative to getFirstDayOfWeek int relativeWeekday =3D (7 + fields[DAY_OF_WEEK] - getFirstDayOfWeek()= ) % 7; =20 - fields[WEEK_OF_MONTH] =3D (fields[DAY_OF_MONTH] - relativeWeekday + 6)= / 7; + fields[WEEK_OF_MONTH] =3D (fields[DAY_OF_MONTH] - relativeWeekday + 12= ) / 7; =20 int weekOfYear =3D (fields[DAY_OF_YEAR] - relativeWeekday + 6) / 7; =20 _______________________________________________ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe From MAILER-DAEMON Fri Dec 26 15:45:44 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZyq4-00062H-I0 for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 15:45:40 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZypn-0005vu-Ca for commit-classpath@gnu.org; Fri, 26 Dec 2003 15:45:23 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZypB-0005ey-Vx for commit-classpath@gnu.org; Fri, 26 Dec 2003 15:45:17 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AZypB-0005ci-L3 for commit-classpath@gnu.org; Fri, 26 Dec 2003 15:44:45 -0500 Received: from [212.6.122.116] (helo=mail2.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1AZxpY-0008Iu-Cp for commit-classpath@gnu.org; Fri, 26 Dec 2003 14:41:04 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail2.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQJf1Ua009492 for ; Fri, 26 Dec 2003 20:41:02 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZxsj-0002R4-00 for ; Fri, 26 Dec 2003 20:44:21 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 20:44:05 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_F+I7/swK2kSWGmO" Message-Id: <200312262044.05535.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.beans X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 20:45:26 -0000 --Boundary-00=_F+I7/swK2kSWGmO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge small fixes to java.beans. Michael --Boundary-00=_F+I7/swK2kSWGmO Content-Type: text/x-diff; charset="us-ascii"; name="beans.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="beans.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1705 diff -u -b -B -r1.1705 ChangeLog --- ChangeLog 26 Dec 2003 18:54:31 -0000 1.1705 +++ ChangeLog 26 Dec 2003 19:39:12 -0000 @@ -1,5 +1,18 @@ 2003-12-26 Michael Koch + * java/beans/BeanDescriptor.java, + java/beans/EventSetDescriptor.java, + java/beans/FeatureDescriptor.java, + java/beans/IndexedPropertyDescriptor.java, + java/beans/Introspector.java, + java/beans/MethodDescriptor.java, + java/beans/PropertyDescriptor.java, + java/beans/SimpleBeanInfo.java: Explicitely import used classes. + * java/beans/beancontext/BeanContextServicesSupport.java + (serialVersionUID): New field. + +2003-12-26 Michael Koch + * java/awt/image/PixelGrabber.java: Removed assert() statements added in last commit as this breaks compilation with jikes. Index: java/beans/BeanDescriptor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/BeanDescriptor.java,v retrieving revision 1.5 diff -u -b -B -r1.5 BeanDescriptor.java --- java/beans/BeanDescriptor.java 22 Jan 2002 22:26:59 -0000 1.5 +++ java/beans/BeanDescriptor.java 26 Dec 2003 19:39:12 -0000 @@ -38,8 +38,6 @@ package java.beans; -import java.util.*; - /** ** BeanDescriptor describes general information about a Bean, plus ** stores the Bean's Class and it's customizer's Class.

Index: java/beans/EventSetDescriptor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/EventSetDescriptor.java,v retrieving revision 1.5 diff -u -b -B -r1.5 EventSetDescriptor.java --- java/beans/EventSetDescriptor.java 22 Jan 2002 22:26:59 -0000 1.5 +++ java/beans/EventSetDescriptor.java 26 Dec 2003 19:39:12 -0000 @@ -38,9 +38,10 @@ package java.beans; -import java.util.*; -import java.lang.reflect.*; -import gnu.java.lang.*; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Vector; +import gnu.java.lang.ClassHelper; /** ** EventSetDescriptor describes the hookup between an event source Index: java/beans/FeatureDescriptor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/FeatureDescriptor.java,v retrieving revision 1.6 diff -u -b -B -r1.6 FeatureDescriptor.java --- java/beans/FeatureDescriptor.java 17 Mar 2003 16:28:50 -0000 1.6 +++ java/beans/FeatureDescriptor.java 26 Dec 2003 19:39:12 -0000 @@ -38,7 +38,8 @@ package java.beans; -import java.util.*; +import java.util.Enumeration; +import java.util.Hashtable; /** * FeatureDescriptor is the common superclass for all JavaBeans Descriptor Index: java/beans/IndexedPropertyDescriptor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/IndexedPropertyDescriptor.java,v retrieving revision 1.8 diff -u -b -B -r1.8 IndexedPropertyDescriptor.java --- java/beans/IndexedPropertyDescriptor.java 16 Oct 2003 10:53:15 -0000 1.8 +++ java/beans/IndexedPropertyDescriptor.java 26 Dec 2003 19:39:13 -0000 @@ -38,8 +38,8 @@ package java.beans; -import java.util.*; -import java.lang.reflect.*; +import java.lang.reflect.Array; +import java.lang.reflect.Method; /** ** IndexedPropertyDescriptor describes information about a JavaBean Index: java/beans/Introspector.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/Introspector.java,v retrieving revision 1.15 diff -u -b -B -r1.15 Introspector.java --- java/beans/Introspector.java 20 Oct 2003 21:37:35 -0000 1.15 +++ java/beans/Introspector.java 26 Dec 2003 19:39:13 -0000 @@ -38,10 +38,12 @@ package java.beans; -import gnu.java.beans.*; -import java.util.*; -import java.lang.reflect.*; -import gnu.java.lang.*; +import gnu.java.beans.BeanInfoEmbryo; +import gnu.java.beans.ExplicitBeanInfo; +import gnu.java.beans.IntrospectionIncubator; +import java.util.Hashtable; +import java.util.Vector; +import gnu.java.lang.ClassHelper; /** * Introspector is the class that does the bulk of the Index: java/beans/MethodDescriptor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/MethodDescriptor.java,v retrieving revision 1.4 diff -u -b -B -r1.4 MethodDescriptor.java --- java/beans/MethodDescriptor.java 22 Jan 2002 22:26:59 -0000 1.4 +++ java/beans/MethodDescriptor.java 26 Dec 2003 19:39:13 -0000 @@ -38,7 +38,7 @@ package java.beans; -import java.lang.reflect.*; +import java.lang.reflect.Method; /** MethodDescriptor describes information about a JavaBeans method. ** It's a fairly straightforward class (at least something in this Index: java/beans/PropertyDescriptor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/PropertyDescriptor.java,v retrieving revision 1.9 diff -u -b -B -r1.9 PropertyDescriptor.java --- java/beans/PropertyDescriptor.java 7 Feb 2003 16:33:48 -0000 1.9 +++ java/beans/PropertyDescriptor.java 26 Dec 2003 19:39:13 -0000 @@ -38,9 +38,7 @@ package java.beans; -import java.util.*; -import java.lang.reflect.*; - +import java.lang.reflect.Method; /** ** PropertyDescriptor describes information about a JavaBean property, Index: java/beans/SimpleBeanInfo.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/SimpleBeanInfo.java,v retrieving revision 1.6 diff -u -b -B -r1.6 SimpleBeanInfo.java --- java/beans/SimpleBeanInfo.java 22 Jan 2002 22:26:59 -0000 1.6 +++ java/beans/SimpleBeanInfo.java 26 Dec 2003 19:39:13 -0000 @@ -38,7 +38,8 @@ package java.beans; -import java.awt.*; +import java.awt.Image; +import java.awt.Toolkit; /** ** SimpleBeanInfo is a class you may extend to more easily Index: java/beans/beancontext/BeanContextServicesSupport.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/beancontext/BeanContextServicesSupport.java,v retrieving revision 1.3 diff -u -b -B -r1.3 BeanContextServicesSupport.java --- java/beans/beancontext/BeanContextServicesSupport.java 18 Mar 2003 13:30:21 -0000 1.3 +++ java/beans/beancontext/BeanContextServicesSupport.java 26 Dec 2003 19:39:13 -0000 @@ -100,6 +100,8 @@ protected static class BCSSServiceProvider implements Serializable { + private static final long serialVersionUID = 861278251667444782L; + protected BeanContextServiceProvider serviceProvider; protected BeanContextServiceProvider getServiceProvider() --Boundary-00=_F+I7/swK2kSWGmO-- From MAILER-DAEMON Fri Dec 26 16:18:33 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZzLt-0003ST-L8 for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 16:18:33 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZzLr-0003SI-G5 for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:18:31 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZzLL-0003LR-ON for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:18:30 -0500 Received: from [212.6.122.116] (helo=mail2.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZzLL-0003LK-Ac for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:17:59 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail2.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQKGUUa024393 for ; Fri, 26 Dec 2003 21:16:31 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZyR4-0002Xq-00 for ; Fri, 26 Dec 2003 21:19:50 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 21:19:34 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_WfJ7/chKBWlnfKj" Message-Id: <200312262119.34396.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: gnu/java/lang/reflect/TypeSignature.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 21:18:32 -0000 --Boundary-00=_WfJ7/chKBWlnfKj Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to reformat gnu/java/lang/reflect/ TypeSignature.java according to libgcj. Michael --Boundary-00=_WfJ7/chKBWlnfKj Content-Type: text/x-diff; charset="us-ascii"; name="reflect.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="reflect.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1707 diff -u -b -B -r1.1707 ChangeLog --- ChangeLog 26 Dec 2003 19:58:02 -0000 1.1707 +++ ChangeLog 26 Dec 2003 20:14:42 -0000 @@ -1,5 +1,9 @@ 2003-12-26 Michael Koch + * gnu/java/lang/reflect/TypeSignature.java: Reformatted. + +2003-12-26 Michael Koch + * java/io/FilePermission.java: Import used classes explicitely. Index: gnu/java/lang/reflect/TypeSignature.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/lang/reflect/TypeSignature.java,v retrieving revision 1.11 diff -u -b -B -r1.11 TypeSignature.java --- gnu/java/lang/reflect/TypeSignature.java 2 Dec 2003 18:35:51 -0000 1.11 +++ gnu/java/lang/reflect/TypeSignature.java 26 Dec 2003 20:14:42 -0000 @@ -173,7 +173,8 @@ * @see #getEncodingOfClass(Class, boolean) * @see #getClassForEncoding(String, boolean) */ - public static Class getClassForEncoding(String type_code, boolean descriptor, ClassLoader loader) + public static Class getClassForEncoding(String type_code, boolean descriptor, + ClassLoader loader) throws ClassNotFoundException { if (descriptor) --Boundary-00=_WfJ7/chKBWlnfKj-- From MAILER-DAEMON Fri Dec 26 16:21:04 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZzOK-0004LV-5J for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 16:21:04 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZzOG-0004JJ-JN for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:21:00 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZzNi-00048j-18 for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:20:57 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AZzNh-0003jT-CY for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:20:25 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1AZy83-0000ZJ-TK for commit-classpath@gnu.org; Fri, 26 Dec 2003 15:00:12 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQK0Aw1016418 for ; Fri, 26 Dec 2003 21:00:10 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZyBF-0002Xd-00 for ; Fri, 26 Dec 2003 21:03:29 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 21:03:13 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_BQJ7/dm1dBY3LbC" Message-Id: <200312262103.13534.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.io.FilePermission X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 21:21:01 -0000 --Boundary-00=_BQJ7/dm1dBY3LbC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge with libgcj again. Michael --Boundary-00=_BQJ7/dm1dBY3LbC Content-Type: text/x-diff; charset="us-ascii"; name="io.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="io.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1706 diff -u -b -B -r1.1706 ChangeLog --- ChangeLog 26 Dec 2003 19:39:54 -0000 1.1706 +++ ChangeLog 26 Dec 2003 19:57:30 -0000 @@ -1,5 +1,10 @@ 2003-12-26 Michael Koch + * java/io/FilePermission.java: + Import used classes explicitely. + +2003-12-26 Michael Koch + * java/beans/BeanDescriptor.java, java/beans/EventSetDescriptor.java, java/beans/FeatureDescriptor.java, Index: java/io/FilePermission.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/FilePermission.java,v retrieving revision 1.12 diff -u -b -B -r1.12 FilePermission.java --- java/io/FilePermission.java 12 Oct 2003 16:53:14 -0000 1.12 +++ java/io/FilePermission.java 26 Dec 2003 19:57:30 -0000 @@ -38,8 +38,7 @@ package java.io; -import java.security.*; - +import java.security.Permission; public final class FilePermission extends Permission implements Serializable { --Boundary-00=_BQJ7/dm1dBY3LbC-- From MAILER-DAEMON Fri Dec 26 16:30:31 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZzXT-0003Ea-33 for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 16:30:31 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZzXP-00039q-UF for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:30:27 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZzWs-0002l6-49 for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:30:25 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZzWr-0002l0-IP for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:29:53 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQKSOw1027733 for ; Fri, 26 Dec 2003 21:28:24 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZycZ-0002Z7-00 for ; Fri, 26 Dec 2003 21:31:43 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 21:31:27 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_fqJ7/+/WoFKMgiv" Message-Id: <200312262131.27592.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: javax.naming X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 21:30:29 -0000 --Boundary-00=_fqJ7/+/WoFKMgiv Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge javax.namiing with libgcj again. Michael --Boundary-00=_fqJ7/+/WoFKMgiv Content-Type: text/x-diff; charset="us-ascii"; name="naming.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="naming.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1708 diff -u -b -B -r1.1708 ChangeLog --- ChangeLog 26 Dec 2003 20:15:09 -0000 1.1708 +++ ChangeLog 26 Dec 2003 20:26:38 -0000 @@ -1,5 +1,39 @@ 2003-12-26 Michael Koch + * javax/naming/event/EventDirContext.java: Jalopied. + (addNamingListener): Fixed typo in method name. + +2003-12-26 Michael Koch + + * javax/naming/directory/Attribute.java, + javax/naming/directory/Attributes.java, + javax/naming/directory/DirContext.java, + javax/naming/directory/InitialDirContext.java, + javax/naming/directory/SearchResult.java, + javax/naming/event/EventContext.java, + javax/naming/event/EventDirContext.java, + javax/naming/event/NamingEvent.java, + javax/naming/event/NamingExceptionEvent.java, + javax/naming/ldap/ControlFactory.java, + javax/naming/ldap/ExtendedRequest.java, + javax/naming/ldap/HasControls.java, + javax/naming/ldap/InitialLdapContext.java, + javax/naming/ldap/LdapContext.java, + javax/naming/ldap/LdapReferralException.java, + javax/naming/ldap/UnsolicitedNotification.java, + javax/naming/ldap/UnsolicitedNotificationListener.java, + javax/naming/spi/DirObjectFactory.java, + javax/naming/spi/DirStateFactory.java, + javax/naming/spi/DirectoryManager.java, + javax/naming/spi/NamingManager.java, + javax/naming/spi/ObjectFactoryBuilder.java, + javax/naming/spi/ResolveResult.java, + javax/naming/spi/Resolver.java, + javax/naming/spi/StateFactory.java: + Import used classes explicitely. + +2003-12-26 Michael Koch + * gnu/java/lang/reflect/TypeSignature.java: Reformatted. 2003-12-26 Michael Koch Index: javax/naming/directory/Attribute.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/directory/Attribute.java,v retrieving revision 1.3 diff -u -b -B -r1.3 Attribute.java --- javax/naming/directory/Attribute.java 12 Oct 2003 16:40:09 -0000 1.3 +++ javax/naming/directory/Attribute.java 26 Dec 2003 20:26:38 -0000 @@ -38,8 +38,11 @@ package javax.naming.directory; -import javax.naming.*; import java.io.Serializable; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/directory/Attributes.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/directory/Attributes.java,v retrieving revision 1.2 diff -u -b -B -r1.2 Attributes.java --- javax/naming/directory/Attributes.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/directory/Attributes.java 26 Dec 2003 20:26:38 -0000 @@ -38,8 +38,10 @@ package javax.naming.directory; -import javax.naming.*; import java.io.Serializable; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingEnumeration; /** * @author Warren Levy Index: javax/naming/directory/DirContext.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/directory/DirContext.java,v retrieving revision 1.2 diff -u -b -B -r1.2 DirContext.java --- javax/naming/directory/DirContext.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/directory/DirContext.java 26 Dec 2003 20:26:38 -0000 @@ -38,7 +38,10 @@ package javax.naming.directory; -import javax.naming.*; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/directory/InitialDirContext.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/directory/InitialDirContext.java,v retrieving revision 1.1 diff -u -b -B -r1.1 InitialDirContext.java --- javax/naming/directory/InitialDirContext.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/directory/InitialDirContext.java 26 Dec 2003 20:26:38 -0000 @@ -38,8 +38,14 @@ package javax.naming.directory; -import javax.naming.*; import java.util.Hashtable; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.Name; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.NoInitialContextException; +import javax.naming.NotContextException; /** * @author Tom Tromey Index: javax/naming/directory/SearchResult.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/directory/SearchResult.java,v retrieving revision 1.1 diff -u -b -B -r1.1 SearchResult.java --- javax/naming/directory/SearchResult.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/directory/SearchResult.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,9 @@ package javax.naming.directory; -import javax.naming.*; + import java.io.Serializable; +import javax.naming.Binding; /** * @author Warren Levy Index: javax/naming/event/EventContext.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/event/EventContext.java,v retrieving revision 1.2 diff -u -b -B -r1.2 EventContext.java --- javax/naming/event/EventContext.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/event/EventContext.java 26 Dec 2003 20:26:38 -0000 @@ -37,7 +37,10 @@ package javax.naming.event; -import javax.naming.*; + +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/event/EventDirContext.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/event/EventDirContext.java,v retrieving revision 1.2 diff -u -b -B -r1.2 EventDirContext.java --- javax/naming/event/EventDirContext.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/event/EventDirContext.java 26 Dec 2003 20:26:38 -0000 @@ -35,10 +35,13 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.naming.event; -import javax.naming.*; -import javax.naming.directory.*; + +import javax.naming.Name; +import javax.naming.NamingException; +import javax.naming.directory.DirContext; +import javax.naming.directory.SearchControls; + /** * @author Warren Levy @@ -44,20 +47,19 @@ * @author Warren Levy * @date June 1, 2001 */ - public interface EventDirContext extends EventContext, DirContext { - void addNamingListener (Name target, String filter, SearchControls ctls, + void addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l) throws NamingException; - void addNamingListeneri (String target, String filter, SearchControls ctls, + void addNamingListener(String target, String filter, SearchControls ctls, NamingListener l) throws NamingException; - void addNamingListener (Name target, String filter, Object[] filterArgs, + void addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) throws NamingException; - void addNamingListener(String target, String filter, - Object[] filterArgs, SearchControls ctls, - NamingListener l) throws NamingException; + void addNamingListener(String target, String filter, Object[] filterArgs, + SearchControls ctls, NamingListener l) + throws NamingException; } Index: javax/naming/event/NamingEvent.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/event/NamingEvent.java,v retrieving revision 1.1 diff -u -b -B -r1.1 NamingEvent.java --- javax/naming/event/NamingEvent.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/event/NamingEvent.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,9 @@ package javax.naming.event; -import javax.naming.*; + import java.util.EventObject; +import javax.naming.Binding; /** * @author Warren Levy Index: javax/naming/event/NamingExceptionEvent.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/event/NamingExceptionEvent.java,v retrieving revision 1.1 diff -u -b -B -r1.1 NamingExceptionEvent.java --- javax/naming/event/NamingExceptionEvent.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/event/NamingExceptionEvent.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,11 @@ package javax.naming.event; -import javax.naming.*; + import java.util.EventObject; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/ldap/ControlFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/ControlFactory.java,v retrieving revision 1.1 diff -u -b -B -r1.1 ControlFactory.java --- javax/naming/ldap/ControlFactory.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/ldap/ControlFactory.java 26 Dec 2003 20:26:38 -0000 @@ -38,9 +38,10 @@ package javax.naming.ldap; -import javax.naming.*; -import java.util.StringTokenizer; import java.util.Hashtable; +import java.util.StringTokenizer; +import javax.naming.Context; +import javax.naming.NamingException; /** * @author Tom Tromey Index: javax/naming/ldap/ExtendedRequest.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/ExtendedRequest.java,v retrieving revision 1.2 diff -u -b -B -r1.2 ExtendedRequest.java --- javax/naming/ldap/ExtendedRequest.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/ldap/ExtendedRequest.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,9 @@ package javax.naming.ldap; + import java.io.Serializable; -import javax.naming.*; +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/ldap/HasControls.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/HasControls.java,v retrieving revision 1.2 diff -u -b -B -r1.2 HasControls.java --- javax/naming/ldap/HasControls.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/ldap/HasControls.java 26 Dec 2003 20:26:38 -0000 @@ -37,7 +37,8 @@ package javax.naming.ldap; -import javax.naming.*; + +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/ldap/InitialLdapContext.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/InitialLdapContext.java,v retrieving revision 1.1 diff -u -b -B -r1.1 InitialLdapContext.java --- javax/naming/ldap/InitialLdapContext.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/ldap/InitialLdapContext.java 26 Dec 2003 20:26:38 -0000 @@ -38,9 +38,12 @@ package javax.naming.ldap; -import javax.naming.*; -import javax.naming.directory.InitialDirContext; import java.util.Hashtable; +import javax.naming.Context; +import javax.naming.NamingException; +import javax.naming.NoInitialContextException; +import javax.naming.NotContextException; +import javax.naming.directory.InitialDirContext; /** * @author Tom Tromey Index: javax/naming/ldap/LdapContext.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/LdapContext.java,v retrieving revision 1.2 diff -u -b -B -r1.2 LdapContext.java --- javax/naming/ldap/LdapContext.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/ldap/LdapContext.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,9 @@ package javax.naming.ldap; -import javax.naming.*; -import javax.naming.directory.*; + +import javax.naming.NamingException; +import javax.naming.directory.DirContext; /** * @author Warren Levy Index: javax/naming/ldap/LdapReferralException.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/LdapReferralException.java,v retrieving revision 1.1 diff -u -b -B -r1.1 LdapReferralException.java --- javax/naming/ldap/LdapReferralException.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/ldap/LdapReferralException.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,11 @@ package javax.naming.ldap; -import javax.naming.*; + import java.util.Hashtable; +import javax.naming.Context; +import javax.naming.NamingException; +import javax.naming.ReferralException; /** * @author Warren Levy Index: javax/naming/ldap/UnsolicitedNotification.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/UnsolicitedNotification.java,v retrieving revision 1.2 diff -u -b -B -r1.2 UnsolicitedNotification.java --- javax/naming/ldap/UnsolicitedNotification.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/ldap/UnsolicitedNotification.java 26 Dec 2003 20:26:38 -0000 @@ -37,7 +37,8 @@ package javax.naming.ldap; -import javax.naming.*; + +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/ldap/UnsolicitedNotificationListener.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/ldap/UnsolicitedNotificationListener.java,v retrieving revision 1.2 diff -u -b -B -r1.2 UnsolicitedNotificationListener.java --- javax/naming/ldap/UnsolicitedNotificationListener.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/ldap/UnsolicitedNotificationListener.java 26 Dec 2003 20:26:38 -0000 @@ -37,7 +37,8 @@ package javax.naming.ldap; -import javax.naming.event.*; + +import javax.naming.event.NamingListener; /** * @author Warren Levy Index: javax/naming/spi/DirObjectFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/DirObjectFactory.java,v retrieving revision 1.2 diff -u -b -B -r1.2 DirObjectFactory.java --- javax/naming/spi/DirObjectFactory.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/spi/DirObjectFactory.java 26 Dec 2003 20:26:38 -0000 @@ -37,9 +37,11 @@ package javax.naming.spi; -import javax.naming.*; -import javax.naming.directory.*; + import java.util.Hashtable; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.directory.Attributes; /** * @author Warren Levy Index: javax/naming/spi/DirStateFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/DirStateFactory.java,v retrieving revision 1.2 diff -u -b -B -r1.2 DirStateFactory.java --- javax/naming/spi/DirStateFactory.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/spi/DirStateFactory.java 26 Dec 2003 20:26:38 -0000 @@ -37,9 +37,12 @@ package javax.naming.spi; -import javax.naming.*; -import javax.naming.directory.*; + import java.util.Hashtable; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingException; +import javax.naming.directory.Attributes; /** * @author Warren Levy Index: javax/naming/spi/DirectoryManager.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/DirectoryManager.java,v retrieving revision 1.1 diff -u -b -B -r1.1 DirectoryManager.java --- javax/naming/spi/DirectoryManager.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/spi/DirectoryManager.java 26 Dec 2003 20:26:38 -0000 @@ -38,11 +38,19 @@ package javax.naming.spi; -import javax.naming.*; -import javax.naming.directory.*; +import java.util.Enumeration; import java.util.Hashtable; import java.util.StringTokenizer; -import java.util.Enumeration; +import javax.naming.CannotProceedException; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingException; +import javax.naming.RefAddr; +import javax.naming.Reference; +import javax.naming.Referenceable; +import javax.naming.StringRefAddr; +import javax.naming.directory.Attributes; +import javax.naming.directory.DirContext; /** * @author Tom Tromey Index: javax/naming/spi/NamingManager.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/NamingManager.java,v retrieving revision 1.5 diff -u -b -B -r1.5 NamingManager.java --- javax/naming/spi/NamingManager.java 25 Oct 2003 13:28:36 -0000 1.5 +++ javax/naming/spi/NamingManager.java 26 Dec 2003 20:26:38 -0000 @@ -38,8 +38,18 @@ package javax.naming.spi; -import java.util.*; -import javax.naming.*; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.StringTokenizer; +import javax.naming.CannotProceedException; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingException; +import javax.naming.NoInitialContextException; +import javax.naming.RefAddr; +import javax.naming.Reference; +import javax.naming.Referenceable; +import javax.naming.StringRefAddr; public class NamingManager { Index: javax/naming/spi/ObjectFactoryBuilder.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/ObjectFactoryBuilder.java,v retrieving revision 1.2 diff -u -b -B -r1.2 ObjectFactoryBuilder.java --- javax/naming/spi/ObjectFactoryBuilder.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/spi/ObjectFactoryBuilder.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,9 @@ package javax.naming.spi; -import javax.naming.*; + import java.util.Hashtable; +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/spi/ResolveResult.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/ResolveResult.java,v retrieving revision 1.1 diff -u -b -B -r1.1 ResolveResult.java --- javax/naming/spi/ResolveResult.java 23 Nov 2002 21:44:28 -0000 1.1 +++ javax/naming/spi/ResolveResult.java 26 Dec 2003 20:26:38 -0000 @@ -37,9 +37,12 @@ package javax.naming.spi; -import javax.naming.*; -import java.util.EventObject; + import java.io.Serializable; +import java.util.EventObject; +import javax.naming.Name; +import javax.naming.CompositeName; +import javax.naming.InvalidNameException; /** * @author Warren Levy Index: javax/naming/spi/Resolver.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/Resolver.java,v retrieving revision 1.2 diff -u -b -B -r1.2 Resolver.java --- javax/naming/spi/Resolver.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/spi/Resolver.java 26 Dec 2003 20:26:38 -0000 @@ -37,7 +37,9 @@ package javax.naming.spi; -import javax.naming.*; + +import javax.naming.Name; +import javax.naming.NamingException; /** * @author Warren Levy Index: javax/naming/spi/StateFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/naming/spi/StateFactory.java,v retrieving revision 1.2 diff -u -b -B -r1.2 StateFactory.java --- javax/naming/spi/StateFactory.java 12 Oct 2003 16:40:09 -0000 1.2 +++ javax/naming/spi/StateFactory.java 26 Dec 2003 20:26:38 -0000 @@ -37,8 +37,11 @@ package javax.naming.spi; -import javax.naming.*; + import java.util.Hashtable; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.NamingException; /** * @author Warren Levy --Boundary-00=_fqJ7/+/WoFKMgiv-- From MAILER-DAEMON Fri Dec 26 16:40:07 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AZzgk-0000WK-Rj for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 16:40:06 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AZzgi-0000UP-7N for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:40:04 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AZzg9-00088p-D3 for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:40:00 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AZzg9-00087s-4r for commit-classpath@gnu.org; Fri, 26 Dec 2003 16:39:29 -0500 Received: from [212.6.122.126] (helo=mail3.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1AZyiW-0002s4-1k for commit-classpath@gnu.org; Fri, 26 Dec 2003 15:37:52 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail3.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQKbn1h018836 for ; Fri, 26 Dec 2003 21:37:50 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AZylh-0002ZW-00 for ; Fri, 26 Dec 2003 21:41:09 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 21:40:53 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_VzJ7/Lc9IP/9eV1" Message-Id: <200312262140.53494.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: ava.util.TimeZone X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 21:40:04 -0000 --Boundary-00=_VzJ7/Lc9IP/9eV1 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to add a method already added in libgcj. Michael --Boundary-00=_VzJ7/Lc9IP/9eV1 Content-Type: text/x-diff; charset="us-ascii"; name="tz.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tz.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1709 diff -u -b -B -r1.1709 ChangeLog --- ChangeLog 26 Dec 2003 20:27:04 -0000 1.1709 +++ ChangeLog 26 Dec 2003 20:35:47 -0000 @@ -1,5 +1,9 @@ 2003-12-26 Michael Koch + * java/util/TimeZone.java (getOffset): New method. + +2003-12-26 Michael Koch + * javax/naming/event/EventDirContext.java: Jalopied. (addNamingListener): Fixed typo in method name. Index: java/util/TimeZone.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/TimeZone.java,v retrieving revision 1.21 diff -u -b -B -r1.21 TimeZone.java --- java/util/TimeZone.java 12 Aug 2003 13:41:26 -0000 1.21 +++ java/util/TimeZone.java 26 Dec 2003 20:35:47 -0000 @@ -1,5 +1,6 @@ /* java.util.TimeZone - Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -809,6 +810,21 @@ public abstract int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds); + /** + * Get the time zone offset for the specified date, modified in case of + * daylight savings. This is the offset to add to UTC to get the local + * time. + * @param date the date represented in millisecends + * since January 1, 1970 00:00:00 GMT. + * @since 1.4 + */ + public int getOffset(long date) + { + return (inDaylightTime(new Date(date)) + ? getRawOffset() + getDSTSavings() + : getRawOffset()); + } + /** * Gets the time zone offset, ignoring daylight savings. This is * the offset to add to UTC to get the local time. --Boundary-00=_VzJ7/Lc9IP/9eV1-- From MAILER-DAEMON Fri Dec 26 18:25:14 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa1KT-0003by-Nt for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 18:25:13 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa1KR-0003Y2-0N for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:25:11 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa1Js-0002hU-Rx for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:25:09 -0500 Received: from [212.6.122.106] (helo=mail1.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa1Jq-0002co-L0 for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:24:34 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail1.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQMN6l1025591 for ; Fri, 26 Dec 2003 23:23:06 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa0Pa-0002pm-00 for ; Fri, 26 Dec 2003 23:26:26 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 23:26:09 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_BWL7/cO1jp0RFU8" Message-Id: <200312262326.09636.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.net.DatagramSocket and ServerSocket X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 23:25:11 -0000 --Boundary-00=_BWL7/cO1jp0RFU8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge socket stuff from libgcj. Michael --Boundary-00=_BWL7/cO1jp0RFU8 Content-Type: text/x-diff; charset="us-ascii"; name="ss.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ss.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1710 diff -u -b -B -r1.1710 ChangeLog --- ChangeLog 26 Dec 2003 20:36:22 -0000 1.1710 +++ ChangeLog 26 Dec 2003 22:20:45 -0000 @@ -1,5 +1,14 @@ 2003-12-26 Michael Koch + * java/net/DatagramSocket.java + (close): Directly return if socket is closed. + * java/net/ServerSocket.java bind(): + If InetSocketAddress.getAddress() returns "null" use "0.0.0.0" as + address to bind to. + (close): Directly return if socket is closed. + +2003-12-26 Michael Koch + * java/util/TimeZone.java (getOffset): New method. 2003-12-26 Michael Koch Index: java/net/DatagramSocket.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/DatagramSocket.java,v retrieving revision 1.36 diff -u -b -B -r1.36 DatagramSocket.java --- java/net/DatagramSocket.java 2 Dec 2003 15:42:34 -0000 1.36 +++ java/net/DatagramSocket.java 26 Dec 2003 22:20:45 -0000 @@ -216,8 +216,9 @@ */ public void close() { - if (!isClosed()) - { + if (isClosed()) + return; + try { getImpl().close(); @@ -241,7 +242,6 @@ catch (IOException e) { // Do nothing. - } } } Index: java/net/ServerSocket.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/ServerSocket.java,v retrieving revision 1.30 diff -u -b -B -r1.30 ServerSocket.java --- java/net/ServerSocket.java 2 Dec 2003 11:24:05 -0000 1.30 +++ java/net/ServerSocket.java 26 Dec 2003 22:20:45 -0000 @@ -226,9 +226,15 @@ if (s != null) s.checkListen (tmp.getPort ()); + InetAddress addr = tmp.getAddress(); + + // Initialize addr with 0.0.0.0. + if (addr == null) + addr = InetAddress.ANY_IF; + try { - impl.bind (tmp.getAddress (), tmp.getPort ()); + impl.bind(addr, tmp.getPort()); impl.listen(backlog); bound = true; } @@ -353,15 +359,15 @@ */ public void close () throws IOException { - if (!isClosed()) - { + if (isClosed()) + return; + impl.close(); impl = null; bound = false; if (getChannel() != null) getChannel().close(); - } } /** --Boundary-00=_BWL7/cO1jp0RFU8-- From MAILER-DAEMON Fri Dec 26 18:30:28 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa1PY-00077G-1i for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 18:30:28 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa1PV-00076z-GP for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:30:25 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa1Ow-0006sB-Sk for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:30:23 -0500 Received: from [212.6.122.116] (helo=mail2.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa1Ow-0006pP-7Q for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:29:50 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail2.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQMSLUa015718 for ; Fri, 26 Dec 2003 23:28:22 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa0Uf-0002qK-00 for ; Fri, 26 Dec 2003 23:31:41 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 23:31:24 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_8aL7/GzOm5VLZko" Message-Id: <200312262331.25002.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.net.DatagramPacket X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 23:30:26 -0000 --Boundary-00=_8aL7/GzOm5VLZko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge the daragram packet stuff with libgcj. Michael --Boundary-00=_8aL7/GzOm5VLZko Content-Type: text/x-diff; charset="us-ascii"; name="dp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dp.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1711 diff -u -b -B -r1.1711 ChangeLog --- ChangeLog 26 Dec 2003 22:21:56 -0000 1.1711 +++ ChangeLog 26 Dec 2003 22:26:13 -0000 @@ -1,5 +1,16 @@ 2003-12-26 Michael Koch + * java/net/DatagramPacket.java + (length): Made package-private to make it accessible via CNI. + (maxlen): New field. + (DatagramPacket): Cleaned up. + (setSocketAddress): Add message to exception. + (setData): Call other setData(). + (setData): Call setLength(). + (setLength): Initialize maxlen too. + +2003-12-26 Michael Koch + * java/net/DatagramSocket.java (close): Directly return if socket is closed. * java/net/ServerSocket.java bind(): Index: java/net/DatagramPacket.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/DatagramPacket.java,v retrieving revision 1.12 diff -u -b -B -r1.12 DatagramPacket.java --- java/net/DatagramPacket.java 26 Nov 2003 15:57:31 -0000 1.12 +++ java/net/DatagramPacket.java 26 Dec 2003 22:26:13 -0000 @@ -78,13 +78,18 @@ private int offset; /** - * The length of the data buffer to send + * The length of the data buffer to send. */ - private int length; + int length; + + /** + * The maximal length of the buffer. + */ + int maxlen; /** * The address to which the packet should be sent or from which it - * was received + * was received. */ private InetAddress address; @@ -106,21 +111,9 @@ */ public DatagramPacket(byte[] buf, int offset, int length) { - if (buf == null) - throw new NullPointerException("Null buffer"); - if (offset < 0) - throw new IllegalArgumentException("Invalid offset: " + offset); - if (length < 0) - throw new IllegalArgumentException("Invalid length: " + length); - if (offset + length > buf.length) - throw new IllegalArgumentException("Potential buffer overflow - offset: " - + offset + " length: " + length); - - buffer = buf; - this.offset = offset; - this.length = length; - this.address = null; - this.port = -1; + setData(buf, offset, length); + address = null; + port = -1; } /** @@ -150,25 +143,9 @@ public DatagramPacket(byte[] buf, int offset, int length, InetAddress address, int port) { - if (buf == null) - throw new NullPointerException("Null buffer"); - if (offset < 0) - throw new IllegalArgumentException("Invalid offset: " + offset); - if (length < 0) - throw new IllegalArgumentException("Invalid length: " + length); - if (offset + length > buf.length) - throw new IllegalArgumentException("Potential buffer overflow - offset: " - + offset + " length: " + length); - if (port < 0 || port > 65535) - throw new IllegalArgumentException("Invalid port: " + port); - if (address == null) - throw new NullPointerException("Null address"); - - buffer = buf; - this.offset = offset; - this.length = length; - this.address = address; - this.port = port; + setData(buf, offset, length); + setAddress(address); + setPort(port); } /** @@ -203,8 +180,13 @@ SocketAddress address) throws SocketException { - this(buf, offset, length, ((InetSocketAddress)address).getAddress(), - ((InetSocketAddress)address).getPort()); + if (! (address instanceof InetSocketAddress)) + throw new IllegalArgumentException("unsupported address type"); + + InetSocketAddress tmp = (InetSocketAddress) address; + setData(buf, offset, length); + setAddress(tmp.getAddress()); + setPort(tmp.getPort()); } /** @@ -223,8 +205,7 @@ public DatagramPacket(byte[] buf, int length, SocketAddress address) throws SocketException { - this(buf, 0, length, ((InetSocketAddress)address).getAddress(), - ((InetSocketAddress)address).getPort()); + this(buf, 0, length, address); } /** @@ -330,9 +311,10 @@ public void setSocketAddress(SocketAddress address) throws IllegalArgumentException { - if (address == null) throw new IllegalArgumentException(); + if (address == null) + throw new IllegalArgumentException("address may not be null"); - InetSocketAddress tmp = (InetSocketAddress)address; + InetSocketAddress tmp = (InetSocketAddress) address; this.address = tmp.getAddress(); this.port = tmp.getPort(); } @@ -359,14 +341,9 @@ * * @since 1.1 */ - public synchronized void setData(byte[] buf) + public void setData(byte[] buf) { - // This form of setData requires setLength to be called separately - // and subsequently. - if (buf == null) - throw new NullPointerException("Null buffer"); - - buffer = buf; + setData(buf, 0, buf.length); } /** @@ -388,15 +365,10 @@ throw new NullPointerException("Null buffer"); if (offset < 0) throw new IllegalArgumentException("Invalid offset: " + offset); - if (length < 0) - throw new IllegalArgumentException("Invalid length: " + length); - if (offset + length > buf.length) - throw new IllegalArgumentException("Potential buffer overflow - offset: " - + offset + " length: " + length); buffer = buf; this.offset = offset; - this.length = length; + setLength(length); } /** @@ -418,6 +390,6 @@ + offset + " length: " + length); this.length = length; + this.maxlen = length; } -} // class DatagramPacket - +} --Boundary-00=_8aL7/GzOm5VLZko-- From MAILER-DAEMON Fri Dec 26 18:36:41 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa1VZ-0001l1-2C for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 18:36:41 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa1VW-0001jF-Vp for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:36:38 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa1V1-0001T7-AO for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:36:38 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa1V0-0001Sv-Qh for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:36:06 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQMYcw1016208 for ; Fri, 26 Dec 2003 23:34:38 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa0ak-0002qs-00 for ; Fri, 26 Dec 2003 23:37:58 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 23:37:41 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_1gL7/XVlih0A55j" Message-Id: <200312262337.41734.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.text.Format X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 23:36:39 -0000 --Boundary-00=_1gL7/XVlih0A55j Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge a serialVersionUID fix from libgcj. Michael --Boundary-00=_1gL7/XVlih0A55j Content-Type: text/x-diff; charset="us-ascii"; name="format.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="format.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1712 diff -u -b -B -r1.1712 ChangeLog --- ChangeLog 26 Dec 2003 22:27:03 -0000 1.1712 +++ ChangeLog 26 Dec 2003 22:32:34 -0000 @@ -1,5 +1,9 @@ 2003-12-26 Michael Koch + * java/text/Format.java (serialVersionUID): Fixed value. + +2003-12-26 Michael Koch + * java/net/DatagramPacket.java (length): Made package-private to make it accessible via CNI. (maxlen): New field. Index: java/text/Format.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/Format.java,v retrieving revision 1.7 diff -u -b -B -r1.7 Format.java --- java/text/Format.java 24 Oct 2003 15:17:16 -0000 1.7 +++ java/text/Format.java 26 Dec 2003 22:32:34 -0000 @@ -1,5 +1,5 @@ /* Format.java -- Abstract superclass for formatting/parsing strings. - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -63,7 +63,7 @@ */ public abstract class Format implements Serializable, Cloneable { - static final long serialVersionUID = 4479235611355683992L; + static final long serialVersionUID = -299282585814624189L; public static class Field extends AttributedCharacterIterator.Attribute { --Boundary-00=_1gL7/XVlih0A55j-- From MAILER-DAEMON Fri Dec 26 18:49:03 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa1hX-00012b-3h for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 18:49:03 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa1hT-000124-M7 for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:48:59 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa1gx-0000jd-JC for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:48:58 -0500 Received: from [212.6.122.141] (helo=mail4.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa1gx-0000ja-6V for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:48:27 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail4.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQMkwHA010809 for ; Fri, 26 Dec 2003 23:46:59 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa0mg-0002s2-00 for ; Fri, 26 Dec 2003 23:50:18 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 23:50:02 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_asL7/sa1ZT4ZE22" Message-Id: <200312262350.02201.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.util.prefs X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 23:49:00 -0000 --Boundary-00=_asL7/sa1ZT4ZE22 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge java.util.prefs with libgcj again. Michael --Boundary-00=_asL7/sa1ZT4ZE22 Content-Type: text/x-diff; charset="us-ascii"; name="prefs.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="prefs.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1714 diff -u -b -B -r1.1714 ChangeLog --- ChangeLog 26 Dec 2003 22:40:33 -0000 1.1714 +++ ChangeLog 26 Dec 2003 22:44:39 -0000 @@ -1,5 +1,12 @@ 2003-12-26 Michael Koch + * java/util/prefs/Preferences.java: + Import used classes explicitely. + * java/util/prefs/AbstractPreferences.java + (cachedChildren): New method. + +2003-12-26 Michael Koch + * java/text/MessageFormat.java (MessageFormat): New constructor. * java/text/NumberFormat.java Index: java/util/prefs/Preferences.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/prefs/Preferences.java,v retrieving revision 1.6 diff -u -b -B -r1.6 Preferences.java --- java/util/prefs/Preferences.java 2 Oct 2003 20:34:40 -0000 1.6 +++ java/util/prefs/Preferences.java 26 Dec 2003 22:44:39 -0000 @@ -45,7 +45,7 @@ import java.security.Permission; import java.security.PrivilegedAction; -import gnu.java.util.prefs.*; +import gnu.java.util.prefs.NodeReader; /** * Preference node containing key value entries and subnodes. Index: java/util/prefs/AbstractPreferences.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/prefs/AbstractPreferences.java,v retrieving revision 1.5 diff -u -b -B -r1.5 AbstractPreferences.java --- java/util/prefs/AbstractPreferences.java 18 Jun 2003 09:42:57 -0000 1.5 +++ java/util/prefs/AbstractPreferences.java 26 Dec 2003 22:44:39 -0000 @@ -183,6 +183,16 @@ } /** + * Returns all known unremoved children of this node. + * + * @return All known unremoved children of this node + */ + protected final AbstractPreferences[] cachedChildren() + { + return (AbstractPreferences[]) childCache.values().toArray(); + } + + /** * Returns all the direct sub nodes of this preferences node. * Needs access to the backing store to give a meaningfull answer. *

--Boundary-00=_asL7/sa1ZT4ZE22-- From MAILER-DAEMON Fri Dec 26 18:49:09 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa1hd-000154-Lm for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 18:49:09 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa1hb-000146-22 for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:49:07 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa1h3-0000l8-TS for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:49:04 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1Aa1h3-0000fD-JG for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:48:33 -0500 Received: from [212.6.122.126] (helo=mail3.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1Aa0eh-0002QA-5c for commit-classpath@gnu.org; Fri, 26 Dec 2003 17:42:03 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail3.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQMg11h004979 for ; Fri, 26 Dec 2003 23:42:01 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa0hs-0002rw-00 for ; Fri, 26 Dec 2003 23:45:20 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 23:45:03 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_vnL7//TqUNb27BL" Message-Id: <200312262345.04453.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.text.MessageFormat and java.text.NumberFormat X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 23:49:08 -0000 --Boundary-00=_vnL7//TqUNb27BL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch tp add missing methods to java.text.MessageFormat and java.text.NumberFormat. Michael --Boundary-00=_vnL7//TqUNb27BL Content-Type: text/x-diff; charset="us-ascii"; name="text.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="text.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1713 diff -u -b -B -r1.1713 ChangeLog --- ChangeLog 26 Dec 2003 22:33:20 -0000 1.1713 +++ ChangeLog 26 Dec 2003 22:39:56 -0000 @@ -1,5 +1,13 @@ 2003-12-26 Michael Koch + * java/text/MessageFormat.java + (MessageFormat): New constructor. + * java/text/NumberFormat.java + (getCurrency): New method. + (setCurrency): New method. + +2003-12-26 Michael Koch + * java/text/Format.java (serialVersionUID): Fixed value. 2003-12-26 Michael Koch Index: java/text/MessageFormat.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/MessageFormat.java,v retrieving revision 1.7 diff -u -b -B -r1.7 MessageFormat.java --- java/text/MessageFormat.java 29 Mar 2003 01:23:20 -0000 1.7 +++ java/text/MessageFormat.java 26 Dec 2003 22:39:57 -0000 @@ -454,11 +454,25 @@ * Creates a new MessageFormat object with * the specified pattern * - * @param aPattern The Pattern + * @param pattern The Pattern */ - public MessageFormat (String pattern) + public MessageFormat(String pattern) { - locale = Locale.getDefault(); + this(pattern, Locale.getDefault()); + } + + /** + * Creates a new MessageFormat object with + * the specified pattern + * + * @param pattern The Pattern + * @param locale The Locale to use + * + * @since 1.4 + */ + public MessageFormat(String pattern, Locale locale) + { + this.locale = locale; applyPattern (pattern); } Index: java/text/NumberFormat.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/NumberFormat.java,v retrieving revision 1.7 diff -u -b -B -r1.7 NumberFormat.java --- java/text/NumberFormat.java 23 Nov 2003 20:25:32 -0000 1.7 +++ java/text/NumberFormat.java 26 Dec 2003 22:39:57 -0000 @@ -38,13 +38,14 @@ package java.text; -import java.util.Locale; -import java.util.ResourceBundle; -import java.util.MissingResourceException; +import java.io.InvalidObjectException; +import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.io.IOException; -import java.io.InvalidObjectException; +import java.util.Currency; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.ResourceBundle; /** * This is the abstract superclass of all classes which format and @@ -759,5 +760,45 @@ (byte) minimumIntegerDigits : Byte.MAX_VALUE; serialVersionOnStream = 1; stream.defaultWriteObject(); + } + + /** + * Returns the currency used by this number format when formatting currency + * values. + * + * The default implementation throws UnsupportedOperationException. + * + * @return The used currency object, or null. + * + * @throws UnsupportedOperationException If the number format class doesn't + * implement currency formatting. + * + * @since 1.4 + */ + public Currency getCurrency() + { + throw new UnsupportedOperationException(); + } + + /** + * Sets the currency used by this number format when formatting currency + * values. + * + * The default implementation throws UnsupportedOperationException. + * + * @param currency The new currency to be used by this number format. + * + * @throws NullPointerException If currenc is null. + * @throws UnsupportedOperationException If the number format class doesn't + * implement currency formatting. + * + * @since 1.4 + */ + public void setCurreny(Currency currency) + { + if (currency == null) + throw new NullPointerException("currency may not be null"); + + throw new UnsupportedOperationException(); } } --Boundary-00=_vnL7//TqUNb27BL-- From MAILER-DAEMON Fri Dec 26 18:53:17 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa1ld-0003FS-I2 for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 18:53:17 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa1la-0003D4-Pa for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:53:14 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa1l2-0002xb-Tv for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:53:12 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa1l2-0002vk-Ap for commit-classpath@gnu.org; Fri, 26 Dec 2003 18:52:40 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQMpBw1022818 for ; Fri, 26 Dec 2003 23:51:12 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa0ql-0002sr-00 for ; Fri, 26 Dec 2003 23:54:31 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Fri, 26 Dec 2003 23:54:15 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_XwL7/NF3Qbo3PN3" Message-Id: <200312262354.15235.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java/util/Calendar.java and java/util/IdentityHashMap.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 23:53:15 -0000 --Boundary-00=_XwL7/NF3Qbo3PN3 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge java/util/Calendar.java and java/util/ IdentityHashMap.java with libgcj again. Michael --Boundary-00=_XwL7/NF3Qbo3PN3 Content-Type: text/x-diff; charset="us-ascii"; name="util.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="util.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1715 diff -u -b -B -r1.1715 ChangeLog --- ChangeLog 26 Dec 2003 22:45:19 -0000 1.1715 +++ ChangeLog 26 Dec 2003 22:48:42 -0000 @@ -1,5 +1,11 @@ 2003-12-26 Michael Koch + * java/util/Calendar.java, + java/util/IdentityHashMap.java: + Import used classes explicitely. + +2003-12-26 Michael Koch + * java/util/prefs/Preferences.java: Import used classes explicitely. * java/util/prefs/AbstractPreferences.java Index: java/util/Calendar.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/Calendar.java,v retrieving revision 1.20 diff -u -b -B -r1.20 Calendar.java --- java/util/Calendar.java 12 Aug 2003 13:41:27 -0000 1.20 +++ java/util/Calendar.java 26 Dec 2003 22:48:42 -0000 @@ -37,8 +37,12 @@ package java.util; + import java.lang.reflect.InvocationTargetException; -import java.io.*; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; /** * This class is an abstract base class for Calendars, which can be Index: java/util/IdentityHashMap.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/IdentityHashMap.java,v retrieving revision 1.13 diff -u -b -B -r1.13 IdentityHashMap.java --- java/util/IdentityHashMap.java 30 Apr 2002 22:06:46 -0000 1.13 +++ java/util/IdentityHashMap.java 26 Dec 2003 22:48:42 -0000 @@ -38,7 +38,10 @@ package java.util; -import java.io.*; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; /** * This class provides a hashtable-backed implementation of the --Boundary-00=_XwL7/NF3Qbo3PN3-- From MAILER-DAEMON Fri Dec 26 19:04:49 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa1wm-0008Lb-Og for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 19:04:48 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa1wk-0008K8-5z for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:04:46 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa1wD-00088B-NR for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:04:44 -0500 Received: from [212.6.122.141] (helo=mail4.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa1wD-00087t-51 for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:04:13 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail4.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQN2iHA014294 for ; Sat, 27 Dec 2003 00:02:45 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa11w-0002zH-00 for ; Sat, 27 Dec 2003 00:06:04 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sat, 27 Dec 2003 00:05:48 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_M7L7/fu/LIIhyEy" Message-Id: <200312270005.48165.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.util.SimpleTimeZone X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 00:04:47 -0000 --Boundary-00=_M7L7/fu/LIIhyEy Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge java.util.SimpleTimeZone with libgcj again. Michael --Boundary-00=_M7L7/fu/LIIhyEy Content-Type: text/x-diff; charset="us-ascii"; name="stz.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="stz.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1716 diff -u -b -B -r1.1716 ChangeLog --- ChangeLog 26 Dec 2003 22:49:19 -0000 1.1716 +++ ChangeLog 26 Dec 2003 22:58:13 -0000 @@ -1,3 +1,11 @@ +2003-12-27 Michael Koch + + * java/util/SimpleTimeZone.java + (setStartRule): Reformated documentation. + (setEndRule): Reworked documentation. + (getDSTSavings): Fixed @since tag. + (setDSTSavings): New method. + 2003-12-26 Michael Koch * java/util/Calendar.java, Index: java/util/SimpleTimeZone.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/SimpleTimeZone.java,v retrieving revision 1.15 diff -u -b -B -r1.15 SimpleTimeZone.java --- java/util/SimpleTimeZone.java 21 Jun 2003 12:08:11 -0000 1.15 +++ java/util/SimpleTimeZone.java 26 Dec 2003 22:58:15 -0000 @@ -1,5 +1,5 @@ /* java.util.SimpleTimeZone - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -390,7 +390,8 @@ * @param dayOfWeek The day of week where daylight savings start. * @param time The time in milliseconds standard time where daylight * savings start. - * @see SimpleTimeZone */ + * @see SimpleTimeZone + */ public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); @@ -411,11 +412,12 @@ * * @param rawOffset The time offset from GMT. * @param id The identifier of this time zone. - * @param Month The end month of daylight savings. + * @param month The end month of daylight savings. * @param day A day in month, or a day of week in month. - * @param DayOfWeek A day of week, when daylight savings ends. - * @param Time A time in millis in standard time. - * @see #setStartRule */ + * @param dayOfWeek A day of week, when daylight savings ends. + * @param time A time in millis in standard time. + * @see #setStartRule + */ public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); @@ -509,11 +511,27 @@ * is one hour, but for some time zones this may be half an our. * @return the daylight savings offset in milliseconds. * - * @since JDK1.2 + * @since 1.2 */ public int getDSTSavings() { return dstSavings; + } + + /** + * Sets the daylight savings offset. This is a positive offset in + * milliseconds with respect to standard time. + * + * @param dstSavings the daylight savings offset in milliseconds. + * + * @since 1.2 + */ + public void setDSTSavings(int dstSavings) + { + if (dstSavings <= 0) + throw new IllegalArgumentException("illegal value for dstSavings"); + + this.dstSavings = dstSavings; } /** --Boundary-00=_M7L7/fu/LIIhyEy-- From MAILER-DAEMON Fri Dec 26 19:14:09 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa25o-0007It-TZ for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 19:14:08 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa25m-0007If-Vz for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:14:06 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa25G-00077l-NL for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:14:05 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa25F-00077Z-US for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:13:34 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQNC5w1029480 for ; Sat, 27 Dec 2003 00:12:05 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa1Az-0002zg-00 for ; Sat, 27 Dec 2003 00:15:25 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sat, 27 Dec 2003 00:15:08 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_8DM7/gPzjyt6NBR" Message-Id: <200312270015.08860.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java/nio/channels/spi/AbstractSelector.java X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 00:14:07 -0000 --Boundary-00=_8DM7/gPzjyt6NBR Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge java/nio/channels/spi/ AbstractSelector.java with libgcj again. Michael --Boundary-00=_8DM7/gPzjyt6NBR Content-Type: text/x-diff; charset="us-ascii"; name="selector.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="selector.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1717 diff -u -b -B -r1.1717 ChangeLog --- ChangeLog 26 Dec 2003 22:59:15 -0000 1.1717 +++ ChangeLog 26 Dec 2003 23:09:41 -0000 @@ -1,5 +1,13 @@ 2003-12-27 Michael Koch + * java/nio/channels/spi/AbstractSelector.java: + Added import for java.nio.channels.ClosedSelectorException. + (close): Added synchronized to method declaration. + (cancelledKeys): Throw ClosedSelectorException if is closed. + (cancelKey): Synchronize on cancelled key set before key. + +2003-12-27 Michael Koch + * java/util/SimpleTimeZone.java (setStartRule): Reformated documentation. (setEndRule): Reworked documentation. Index: java/nio/channels/spi/AbstractSelector.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/channels/spi/AbstractSelector.java,v retrieving revision 1.7 diff -u -b -B -r1.7 AbstractSelector.java --- java/nio/channels/spi/AbstractSelector.java 12 Oct 2003 16:56:00 -0000 1.7 +++ java/nio/channels/spi/AbstractSelector.java 26 Dec 2003 23:09:41 -0000 @@ -39,6 +39,7 @@ package java.nio.channels.spi; import java.io.IOException; +import java.nio.channels.ClosedSelectorException; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.util.Set; @@ -64,7 +65,7 @@ * * @exception IOException If an error occurs */ - public final void close () throws IOException + public final synchronized void close () throws IOException { if (closed) return; @@ -102,12 +103,18 @@ protected final Set cancelledKeys() { + if (!isOpen()) + throw new ClosedSelectorException(); + return cancelledKeys; } final void cancelKey (AbstractSelectionKey key) { - cancelledKeys.remove (key); + synchronized (cancelledKeys) + { + cancelledKeys.remove(key); + } } /** --Boundary-00=_8DM7/gPzjyt6NBR-- From MAILER-DAEMON Fri Dec 26 19:45:55 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aa2aY-00072H-Kz for mharc-commit-classpath@gnu.org; Fri, 26 Dec 2003 19:45:54 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aa2aP-0006w3-OS for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:45:45 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aa2ZY-0006QS-BI for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:45:23 -0500 Received: from [212.6.122.141] (helo=mail4.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aa2ZX-0006P8-I1 for commit-classpath@gnu.org; Fri, 26 Dec 2003 19:44:51 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-137.ewetel.net [80.228.81.137]) by mail4.ewetel.de (8.12.1/8.12.9) with ESMTP id hBQNhKHA022658 for ; Sat, 27 Dec 2003 00:43:21 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1Aa1fF-00031P-00 for ; Sat, 27 Dec 2003 00:46:41 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sat, 27 Dec 2003 00:46:23 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_PhM7/6Ob0S31mVO" Message-Id: <200312270046.24037.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: javax.print.attribute.standard X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 00:45:48 -0000 --Boundary-00=_PhM7/6Ob0S31mVO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge new classes from libgcj. Michael --Boundary-00=_PhM7/6Ob0S31mVO Content-Type: text/x-diff; charset="us-ascii"; name="print.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="print.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1718 diff -u -b -B -r1.1718 ChangeLog --- ChangeLog 26 Dec 2003 23:10:16 -0000 1.1718 +++ ChangeLog 26 Dec 2003 23:40:44 -0000 @@ -1,5 +1,20 @@ 2003-12-27 Michael Koch + * javax/print/attribute/standard/Copies.java, + javax/print/attribute/standard/JobImpressions.java, + javax/print/attribute/standard/JobMediaSheets.java, + javax/print/attribute/standard/JobPriority.java, + javax/print/attribute/standard/NumberOfDocuments.java, + javax/print/attribute/standard/NumberOfInterveningJobs.java, + javax/print/attribute/standard/NumberUp.java, + javax/print/attribute/standard/PagesPerMinuteColor.java, + javax/print/attribute/standard/PagesPerMinute.java, + javax/print/attribute/standard/QueuedJobCount.java, + javax/print/attribute/standard/Makefile.am, + javax/print/attribute/standard/package.html: New files + +2003-12-27 Michael Koch + * java/nio/channels/spi/AbstractSelector.java: Added import for java.nio.channels.ClosedSelectorException. (close): Added synchronized to method declaration. Index: javax/print/attribute/standard/Copies.java =================================================================== RCS file: javax/print/attribute/standard/Copies.java diff -N javax/print/attribute/standard/Copies.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/Copies.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,101 @@ +/* Copies.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + +/** + * @author Michael Koch + */ +public final class Copies extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = -6426631521680023833L; + + /** + * Creates a Copies object. + * + * @param value the number of copies + * + * @exception IllegalArgumentException if value < 1 + */ + public Copies(int value) + { + super(value); + + if (value < 1) + throw new IllegalArgumentException("value may not be less than 1"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof Copies)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class Copies itself + */ + public final Class getCategory() + { + return Copies.class; + } + + /** + * Returns name of this class. + * + * @return the string "copies" + */ + public final String getName() + { + return "copies"; + } +} Index: javax/print/attribute/standard/JobImpressions.java =================================================================== RCS file: javax/print/attribute/standard/JobImpressions.java diff -N javax/print/attribute/standard/JobImpressions.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/JobImpressions.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,101 @@ +/* JobImpressions.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + +/** + * @author Michael Koch + */ +public final class JobImpressions extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = 8225537206784322464L; + + /** + * Creates a JobImpressions object. + * + * @param value the number of impressions + * + * @exception IllegalArgumentException if value < 0 + */ + public JobImpressions(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobImpressions)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobImpressions itself + */ + public final Class getCategory() + { + return JobImpressions.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-impressions" + */ + public final String getName() + { + return "job-impressions"; + } +} Index: javax/print/attribute/standard/JobMediaSheets.java =================================================================== RCS file: javax/print/attribute/standard/JobMediaSheets.java diff -N javax/print/attribute/standard/JobMediaSheets.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/JobMediaSheets.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,101 @@ +/* JobMediaSheets.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + +/** + * @author Michael Koch + */ +public class JobMediaSheets extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = 408871131531979741L; + + /** + * Creates a JobMediaSheets object. + * + * @param value the number of media sheets for a print job + * + * @exception IllegalArgumentException if value < 0 + */ + public JobMediaSheets(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobMediaSheets)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobMediaSheets itself + */ + public final Class getCategory() + { + return JobMediaSheets.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-media-sheets" + */ + public final String getName() + { + return "job-media-sheets"; + } +} Index: javax/print/attribute/standard/JobPriority.java =================================================================== RCS file: javax/print/attribute/standard/JobPriority.java diff -N javax/print/attribute/standard/JobPriority.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/JobPriority.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,98 @@ +/* JobPriority.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + +public final class JobPriority extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = -4599900369040602769L; + + /** + * Creates a JobPriority object. + * + * @param value the priority + * + * @exception IllegalArgumentException if value < 1 or value > 100 + */ + public JobPriority(int value) + { + super(value); + + if (value < 1 || value > 100) + throw new IllegalArgumentException("value out of range"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobPriority)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobPriority itself + */ + public final Class getCategory() + { + return JobPriority.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-priority" + */ + public final String getName() + { + return "job-priority"; + } +} Index: javax/print/attribute/standard/NumberOfDocuments.java =================================================================== RCS file: javax/print/attribute/standard/NumberOfDocuments.java diff -N javax/print/attribute/standard/NumberOfDocuments.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/NumberOfDocuments.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,100 @@ +/* NumberOfDocuments.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintJobAttribute; + +/** + * @author Michael Koch + */ +public final class NumberOfDocuments extends IntegerSyntax + implements PrintJobAttribute +{ + private static final long serialVersionUID = 7891881310684461097L; + + /** + * Creates a NumberOfDocuments object. + * + * @param value the number of documents + * + * @exception IllegalArgumentException if value < 0 + */ + public NumberOfDocuments(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof NumberOfDocuments)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class NumberOfDocuments itself + */ + public final Class getCategory() + { + return NumberOfDocuments.class; + } + + /** + * Returns name of this class. + * + * @return the string "number-of-documents" + */ + public final String getName() + { + return "number-of-documents"; + } +} Index: javax/print/attribute/standard/NumberOfInterveningJobs.java =================================================================== RCS file: javax/print/attribute/standard/NumberOfInterveningJobs.java diff -N javax/print/attribute/standard/NumberOfInterveningJobs.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/NumberOfInterveningJobs.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,100 @@ +/* NumberOfInterveningJobs.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintJobAttribute; + +/** + * @author Michael Koch + */ +public final class NumberOfInterveningJobs extends IntegerSyntax + implements PrintJobAttribute +{ + private static final long serialVersionUID = 2568141124844982746L; + + /** + * Creates a QueuedJobCount object. + * + * @param value the number of intervening jobs + * + * @exception IllegalArgumentException if value < 0 + */ + public NumberOfInterveningJobs(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof NumberOfInterveningJobs)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class NumberOfInterveningJobs itself + */ + public final Class getCategory() + { + return NumberOfInterveningJobs.class; + } + + /** + * Returns name of this class. + * + * @return the string "number-of-intervening-jobs" + */ + public final String getName() + { + return "number-of-intervening-jobs"; + } +} Index: javax/print/attribute/standard/NumberUp.java =================================================================== RCS file: javax/print/attribute/standard/NumberUp.java diff -N javax/print/attribute/standard/NumberUp.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/NumberUp.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,100 @@ +/* NumberUp.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + +/** + * @author Michael Koch + */ +public final class NumberUp extends IntegerSyntax + implements DocAttribute, PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = -3040436486786527811L; + + /** + * Creates a NumberUp object. + * + * @param value the number of print-stream pages to print on a single side + * of a media + * + * @exception IllegalArgumentException if value < 1 + */ + public NumberUp(int value) + { + super(value); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof NumberUp)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class NumberUp itself + */ + public final Class getCategory() + { + return NumberUp.class; + } + + /** + * Returns name of this class. + * + * @return the string "number-up" + */ + public final String getName() + { + return "number-up"; + } +} Index: javax/print/attribute/standard/PagesPerMinuteColor.java =================================================================== RCS file: javax/print/attribute/standard/PagesPerMinuteColor.java diff -N javax/print/attribute/standard/PagesPerMinuteColor.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/PagesPerMinuteColor.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,100 @@ +/* PagesPerMinuteColor.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintServiceAttribute; + +/** + * @author Michael Koch + */ +public final class PagesPerMinuteColor extends IntegerSyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = 1684993151687470944L; + + /** + * Creates a PagesPerMinuteColor object. + * + * @param value the number of pages per minute + * + * @exception IllegalArgumentException if value < 0 + */ + public PagesPerMinuteColor(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PagesPerMinuteColor)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PagesPerMinuteColor itself + */ + public final Class getCategory() + { + return PagesPerMinuteColor.class; + } + + /** + * Returns name of this class. + * + * @return the string "pages-per-minute-color" + */ + public final String getName() + { + return "pages-per-minute-color"; + } +} Index: javax/print/attribute/standard/PagesPerMinute.java =================================================================== RCS file: javax/print/attribute/standard/PagesPerMinute.java diff -N javax/print/attribute/standard/PagesPerMinute.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/PagesPerMinute.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,100 @@ +/* PagesPerMinute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintServiceAttribute; + +/** + * @author Michael Koch + */ +public final class PagesPerMinute extends IntegerSyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = -6366403993072862015L; + + /** + * Creates a PagesPerMinute object. + * + * @param value the number of pages per minute + * + * @exception IllegalArgumentException if value < 0 + */ + public PagesPerMinute(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PagesPerMinute)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PagesPerMinute itself + */ + public final Class getCategory() + { + return PagesPerMinute.class; + } + + /** + * Returns name of this class. + * + * @return the string "pages-per-minute" + */ + public final String getName() + { + return "pages-per-minute"; + } +} Index: javax/print/attribute/standard/QueuedJobCount.java =================================================================== RCS file: javax/print/attribute/standard/QueuedJobCount.java diff -N javax/print/attribute/standard/QueuedJobCount.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/QueuedJobCount.java 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,100 @@ +/* QueuedJobCount.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.IntegerSyntax; +import javax.print.attribute.PrintServiceAttribute; + +/** + * @author Michael Koch + */ +public final class QueuedJobCount extends IntegerSyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = 7499723077864047742L; + + /** + * Creates a QueuedJobCount object. + * + * @param value the number of queued jobs + * + * @exception IllegalArgumentException if value < 0 + */ + public QueuedJobCount(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof QueuedJobCount)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class QueuedJobCount itself + */ + public final Class getCategory() + { + return QueuedJobCount.class; + } + + /** + * Returns name of this class. + * + * @return the string "queued-job-count" + */ + public final String getName() + { + return "queued-job-count"; + } +} Index: javax/print/attribute/standard/package.html =================================================================== RCS file: javax/print/attribute/standard/package.html diff -N javax/print/attribute/standard/package.html --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/package.html 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,47 @@ + + + + +GNU Classpath - javax.print.attribute.standard + + +

+ + + Index: javax/print/attribute/standard/Makefile.am =================================================================== RCS file: javax/print/attribute/standard/Makefile.am diff -N javax/print/attribute/standard/Makefile.am --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ javax/print/attribute/standard/Makefile.am 26 Dec 2003 23:40:44 -0000 @@ -0,0 +1,14 @@ +## Input file for automake to generate the Makefile.in used by configure + +EXTRA_DIST = \ +Copies.java \ +JobImpressions.java \ +JobMediaSheets.java \ +JobPriority.java \ +NumberOfDocuments.java \ +NumberOfInterveningJobs.java \ +NumberUp.java \ +PagesPerMinute.java \ \ +PagesPerMinuteColor.java \ +QueuedJobCount.java \ +package.html --Boundary-00=_PhM7/6Ob0S31mVO-- From MAILER-DAEMON Sat Dec 27 07:09:08 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaDFj-0006n4-Eu for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 07:09:07 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaDFX-0006j2-0J for commit-classpath@gnu.org; Sat, 27 Dec 2003 07:08:55 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaDEk-0006HO-8d for commit-classpath@gnu.org; Sat, 27 Dec 2003 07:08:38 -0500 Received: from [62.177.154.238] (helo=lembu.sumatrasoftware.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaDBl-0005kH-Cf for commit-classpath@gnu.org; Sat, 27 Dec 2003 07:05:01 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C3CC67.3D93EA0E" Date: Sat, 27 Dec 2003 11:50:26 +0100 Message-ID: <788B535AB1F9CB49BB9C229372B50ACC04C742@LEMBU.sumatrasoftware.com> Content-class: urn:content-classes:message X-MS-Has-Attach: yes X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0 X-MS-TNEF-Correlator: Thread-Topic: [PATCH] java.lang.Runtime split Thread-Index: AcPMZzxaQLNvKqI7TYqYw4Tc9mBYAg== From: "Jeroen Frijters" To: Subject: [PATCH] java.lang.Runtime split X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 12:08:56 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C3CC67.3D93EA0E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I committed the split of java.lang.Runtime into java.lang.Runtime and java.lang.VMRuntime. Regards, Jeroen ------_=_NextPart_001_01C3CC67.3D93EA0E Content-Type: application/octet-stream; name="runtime.diff" Content-Transfer-Encoding: base64 Content-Description: runtime.diff Content-Disposition: attachment; filename="runtime.diff" SW5kZXg6IENoYW5nZUxvZw0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9jdnNyb290L2NsYXNzcGF0 aC9jbGFzc3BhdGgvQ2hhbmdlTG9nLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4xNzE5DQpkaWZm IC11IC1yMS4xNzE5IENoYW5nZUxvZw0KLS0tIENoYW5nZUxvZwkyNiBEZWMgMjAwMyAyMzo0MTo1 NiAtMDA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DANCkBAIC0xLDMgKzEsNiBAQA0KK05ldyBzaW5jZSBsYXN0IHJlbGVh c2UNCisqIFNwbGl0IG5hdGl2ZSBtZXRob2RzIGluIGphdmEubGFuZy5SdW50aW1lIGludG8gamF2 YS5sYW5nLlZNUnVudGltZS4NCisNCiBOZXcgaW4gcmVsZWFzZSAwLjA3ICgyMDAzLzMwLzExKQ0K IA0KICogV29ya3Mgd2l0aCBsaWJ0b29sIDEuNSAoYW5kIDEuNC4zKS4NCkluZGV4OiBqYXZhL2xh bmcvU3lzdGVtLmphdmENCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBmaWxlOiAvY3Zzcm9vdC9jbGFzc3BhdGgv Y2xhc3NwYXRoL2phdmEvbGFuZy9TeXN0ZW0uamF2YSx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEu MzANCmRpZmYgLXUgLXIxLjMwIFN5c3RlbS5qYXZhDQotLS0gamF2YS9sYW5nL1N5c3RlbS5qYXZh CTggQXVnIDIwMDMgMTg6MzU6MTYgLTAwMDAJMS4zMA0KKysrIGphdmEvbGFuZy9TeXN0ZW0uamF2 YQkyNyBEZWMgMjAwMyAxMDo0NjowOCAtMDAwMA0KQEAgLTY3NSw3ICs2NzUsNyBAQA0KICAgcHVi bGljIHN0YXRpYyBTdHJpbmcgbWFwTGlicmFyeU5hbWUoU3RyaW5nIGxpYm5hbWUpDQogICB7DQog ICAgIC8vIFhYWCBGaXggdGhpcyEhISENCi0gICAgcmV0dXJuIFJ1bnRpbWUubmF0aXZlR2V0TGli bmFtZSgiIiwgbGlibmFtZSk7DQorICAgIHJldHVybiBWTVJ1bnRpbWUubmF0aXZlR2V0TGlibmFt ZSgiIiwgbGlibmFtZSk7DQogICB9DQogDQogfSAvLyBjbGFzcyBTeXN0ZW0NCg== ------_=_NextPart_001_01C3CC67.3D93EA0E-- From MAILER-DAEMON Sat Dec 27 09:18:11 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaFGd-0004fp-I7 for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 09:18:11 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaFFe-0004E2-O2 for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:17:10 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaFEo-0003wC-Db for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:16:50 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AaFEn-0003sa-Q8 for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:16:17 -0500 Received: from [62.4.16.106] (helo=kraid.nerim.net) by mx20.gnu.org with esmtp (Exim 4.24) id 1AaEDx-0007Yk-KP for commit-classpath@gnu.org; Sat, 27 Dec 2003 08:11:21 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 3359C42092 for ; Sat, 27 Dec 2003 14:10:48 +0100 (CET) Message-ID: <3FED84F7.1060809@kaffe.org> Date: Sat, 27 Dec 2003 14:11:19 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------050300090206000508080805" Subject: BufferedReader fix X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 14:18:09 -0000 This is a multi-part message in MIME format. --------------050300090206000508080805 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I've checked in only one of the two patch to BufferedReader as I can't figure out what was wrong with the other one. This patch make readLine() really block on all input readers. Guilhem. --------------050300090206000508080805 Content-Type: text/plain; name="patch_buffer" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_buffer" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1721 diff -u -r1.1721 ChangeLog --- ChangeLog 27 Dec 2003 12:58:35 -0000 1.1721 +++ ChangeLog 27 Dec 2003 13:05:23 -0000 @@ -1,3 +1,8 @@ +2003-12-27 Guilhem Lavaux + + * java/io/BufferedReader (readLine): Make readLine() really block + until either EOF is reached or a true error happens. + 2003-12-27 Michael Koch * gnu/java/net/protocol/http/Connection.java Index: java/io/BufferedReader.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/BufferedReader.java,v retrieving revision 1.20 diff -u -r1.20 BufferedReader.java --- java/io/BufferedReader.java 26 Dec 2003 12:15:51 -0000 1.20 +++ java/io/BufferedReader.java 27 Dec 2003 13:05:24 -0000 @@ -460,12 +460,19 @@ boolean eof = false; for (;;) { - int ch = read(); - if (ch < 0) + // readLine should block. So we must not return until a -1 is reached. + if (pos >= limit) { - eof = true; - break; + // here count == 0 isn't sufficient to give a failure. + int count = fill(); + if (count < 0) + { + eof = true; + break; + } + continue; } + int ch = buffer[pos++]; if (ch == '\n' || ch == '\r') { // Check here if a '\r' was the last char in the buffer; if so, --------------050300090206000508080805-- From MAILER-DAEMON Sat Dec 27 09:23:13 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaFLU-0001Vr-Oj for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 09:23:12 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaFLS-0001Tl-2h for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:23:10 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaFKv-0001CT-CE for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:23:08 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaFKu-0001CG-UQ for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:22:37 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-64-171.ewetel.net [80.228.64.171]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBRDL7w1008320 for ; Sat, 27 Dec 2003 14:21:08 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AaEQh-0004qX-00 for ; Sat, 27 Dec 2003 14:24:31 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sat, 27 Dec 2003 14:24:11 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_7fY7/ouC8gcbftK" Message-Id: <200312271424.12559.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: gnu.java.net.protocol.http.Connection X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 14:23:10 -0000 --Boundary-00=_7fY7/ouC8gcbftK Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge some parts of gnu.java.net.protocol.http.Connection from libgcj. Michael --Boundary-00=_7fY7/ouC8gcbftK Content-Type: text/x-diff; charset="us-ascii"; name="http.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="http.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1720 diff -u -b -B -r1.1720 ChangeLog --- ChangeLog 27 Dec 2003 10:48:48 -0000 1.1720 +++ ChangeLog 27 Dec 2003 12:39:12 -0000 @@ -1,3 +1,17 @@ +2003-12-27 Michael Koch + + * gnu/java/net/protocol/http/Connection.java + (outputWriter): Removed. + (connect): Always initialize inputStream, don't initialize + outputWriter. + (sendRequest): Create PrintWriter object locally. + (receiveReply): Made private. + (getInputStream): Return inputStream confitionally. + (getOuputStream): Documentation added. + (setRequestMethod): Reordered. + (getHeaderField): Reordered. + (getHeaderFieldKey): Reordered. + 2003-12-27 Jeroen Frijters * java/lang/System.java (mapLibraryName): Changed to call Index: gnu/java/net/protocol/http/Connection.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/Connection.java,v retrieving revision 1.6 diff -u -b -B -r1.6 Connection.java --- gnu/java/net/protocol/http/Connection.java 2 Dec 2003 09:28:22 -0000 1.6 +++ gnu/java/net/protocol/http/Connection.java 27 Dec 2003 12:39:12 -0000 @@ -119,11 +119,6 @@ private ByteArrayOutputStream bufferedOutputStream; /** - * The PrintWriter for this connection (used internally) - */ - private PrintWriter outputWriter; - - /** * This is the object that holds the header field information */ private HeaderFieldHelper headers = new HeaderFieldHelper(); @@ -164,13 +159,11 @@ socket = new Socket(url.getHost(), port); } - if (doInput) - inputStream = new DataInputStream - (new BufferedInputStream (socket.getInputStream())); + inputStream = + new DataInputStream(new BufferedInputStream(socket.getInputStream())); outputStream = new BufferedOutputStream (socket.getOutputStream()); bufferedOutputStream = new ByteArrayOutputStream (256); //default is too small - outputWriter = new PrintWriter (new OutputStreamWriter (outputStream, "8859_1")); sendRequest(); receiveReply(); @@ -202,36 +195,30 @@ */ void sendRequest() throws IOException { + // Create PrintWriter for easier sending of headers. + PrintWriter outputWriter = + new PrintWriter(new OutputStreamWriter(outputStream, "8859_1")); + // Send request including any request properties that were set. outputWriter.print (getRequestMethod() + " " + url.getFile() + " HTTP/1.1\r\n"); // Set additional HTTP headers. if (getRequestProperty ("Host") == null) - { setRequestProperty ("Host", url.getHost()); - } if (getRequestProperty ("Connection") == null) - { setRequestProperty ("Connection", "Close"); - } if (getRequestProperty ("user-agent") == null) - { setRequestProperty ("user-agent", "gnu-classpath/" + System.getProperty ("classpath.version")); - } if (getRequestProperty ("accept") == null) - { setRequestProperty ("accept", "*/*"); - } if (getRequestProperty ("Content-type") == null) - { setRequestProperty ("Content-type", "application/x-www-form-urlencoded"); - } // Set correct content length. setRequestProperty ("Content-length", String.valueOf (bufferedOutputStream.size())); @@ -257,7 +244,7 @@ /** * Read HTTP reply from inputStream. */ - void receiveReply() throws IOException + private void receiveReply() throws IOException { // Parse the reply String line = inputStream.readLine(); @@ -349,27 +336,6 @@ } /** - * Overrides java.net.HttpURLConnection.setRequestMethod() in order to - * restrict the available methods to only those we support. - * - * @param method The RequestMethod to use - * - * @exception ProtocolException If the specified method is not valid - */ - public void setRequestMethod (String method) throws ProtocolException - { - method = method.toUpperCase(); - - if (method.equals("GET") - || method.equals("HEAD") - || method.equals("POST")) - super.setRequestMethod (method); - else - throw new ProtocolException ("Unsupported or unknown request method " + - method); - } - - /** * Return a boolean indicating whether or not this connection is * going through a proxy * @@ -381,34 +347,6 @@ } /** - * This method returns the header field key at the specified numeric - * index. - * - * @param n The index into the header field array - * - * @return The name of the header field key, or null if the - * specified index is not valid. - */ - public String getHeaderFieldKey (int n) - { - return headers.getHeaderFieldKeyByIndex (n); - } - - /** - * This method returns the header field value at the specified numeric - * index. - * - * @param n The index into the header field array - * - * @return The value of the specified header field, or null - * if the specified index is not valid. - */ - public String getHeaderField (int n) - { - return headers.getHeaderFieldValueByIndex (n); - } - - /** * Returns an InputStream for reading from this connection. This stream * will be "queued up" for reading just the contents of the requested file. * Overrides URLConnection.getInputStream() @@ -419,15 +357,22 @@ */ public InputStream getInputStream() throws IOException { - if(inputStream != null) - return inputStream; - if (!connected) connect(); + if (!doInput) + throw new ProtocolException("Can't open InputStream if doInput is false"); + return inputStream; } + /** + * Returns on OutputStream for writing to this connection. + * + * @return An OutputStream for this connection. + * + * @exception IOException If an error occurs + */ public OutputStream getOutputStream() throws IOException { if (!doOutput) @@ -443,5 +388,52 @@ return bufferedOutputStream; } + /** + * Overrides java.net.HttpURLConnection.setRequestMethod() in order to + * restrict the available methods to only those we support. + * + * @param method The RequestMethod to use + * + * @exception ProtocolException If the specified method is not valid + */ + public void setRequestMethod (String method) throws ProtocolException + { + method = method.toUpperCase(); + if (method.equals("GET") + || method.equals("HEAD") + || method.equals("POST")) + super.setRequestMethod (method); + else + throw new ProtocolException ("Unsupported or unknown request method " + + method); + } + + /** + * This method returns the header field value at the specified numeric + * index. + * + * @param n The index into the header field array + * + * @return The value of the specified header field, or null + * if the specified index is not valid. + */ + public String getHeaderField(int n) + { + return headers.getHeaderFieldValueByIndex (n); + } + + /** + * This method returns the header field key at the specified numeric + * index. + * + * @param n The index into the header field array + * + * @return The name of the header field key, or null if the + * specified index is not valid. + */ + public String getHeaderFieldKey(int n) + { + return headers.getHeaderFieldKeyByIndex (n); + } } --Boundary-00=_7fY7/ouC8gcbftK-- From MAILER-DAEMON Sat Dec 27 09:40:32 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaFcG-0001AP-Dk for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 09:40:32 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaFcE-00019G-Af for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:40:30 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaFbh-0000yL-Ix for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:40:29 -0500 Received: from [62.4.16.106] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaFbg-0000wr-MU for commit-classpath@gnu.org; Sat, 27 Dec 2003 09:39:56 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 7FC0441965 for ; Sat, 27 Dec 2003 14:38:24 +0100 (CET) Message-ID: <3FED8B6B.8090202@kaffe.org> Date: Sat, 27 Dec 2003 14:38:51 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------080605080506070505060806" Subject: FYI: CharArrayReader fix. X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 14:40:30 -0000 This is a multi-part message in MIME format. --------------080605080506070505060806 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I commited this patch to merge kaffe and classpath CharArrayReader. This modification has been done because of OutOfBounds new mauve testlet. Guilhem. --------------080605080506070505060806 Content-Type: text/plain; name="patch_char" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_char" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1722 diff -u -r1.1722 ChangeLog --- ChangeLog 27 Dec 2003 13:12:34 -0000 1.1722 +++ ChangeLog 27 Dec 2003 13:37:38 -0000 @@ -1,6 +1,12 @@ 2003-12-27 Guilhem Lavaux - * java/io/BufferedReader (readLine): Make readLine() really block + * java/io/CharArrayReader.java (read): It should throw + IndexOutOfBoundsException and not ArrayIndexOutOfBoundsException (see + mauve). + +2003-12-27 Guilhem Lavaux + + * java/io/BufferedReader.java (readLine): Make readLine() really block until either EOF is reached or a true error happens. 2003-12-27 Michael Koch Index: java/io/CharArrayReader.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/CharArrayReader.java,v retrieving revision 1.5 diff -u -r1.5 CharArrayReader.java --- java/io/CharArrayReader.java 22 Jan 2002 22:26:59 -0000 1.5 +++ java/io/CharArrayReader.java 27 Dec 2003 13:37:38 -0000 @@ -228,7 +228,7 @@ /* Don't need to check pos value, arraycopy will check it. */ if (off < 0 || len < 0 || off + len > b.length) - throw new ArrayIndexOutOfBoundsException(); + throw new IndexOutOfBoundsException(); if (pos >= count) return -1; --------------080605080506070505060806-- From MAILER-DAEMON Sat Dec 27 12:31:19 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaIHX-0002Fm-PP for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 12:31:19 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaIHS-0002Ey-C6 for commit-classpath@gnu.org; Sat, 27 Dec 2003 12:31:14 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaIGv-00027p-1a for commit-classpath@gnu.org; Sat, 27 Dec 2003 12:31:13 -0500 Received: from [62.4.16.106] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaIGN-000259-Ig; Sat, 27 Dec 2003 12:30:07 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id B644B419E9; Sat, 27 Dec 2003 17:28:37 +0100 (CET) Message-ID: <3FEDB354.2090606@kaffe.org> Date: Sat, 27 Dec 2003 17:29:08 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org, classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090003020805070803070308" Cc: Subject: FYI: gnu.java.net.protocol.http.Connection X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 17:31:18 -0000 This is a multi-part message in MIME format. --------------090003020805070803070308 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Here are two fixes concerning HTTP. Briefly: * receiveReply() must also add the reponse to the header list (maybe some doc should be added about it) * getHeaderField() and getHeaderFieldKey() must check the state of the connection and try to open it if it's closed. Guilhem. --------------090003020805070803070308 Content-Type: text/plain; name="patch_connection" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_connection" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1723 diff -u -r1.1723 ChangeLog --- ChangeLog 27 Dec 2003 13:38:17 -0000 1.1723 +++ ChangeLog 27 Dec 2003 16:21:36 -0000 @@ -1,5 +1,12 @@ 2003-12-27 Guilhem Lavaux + * gnu/java/net/protocol/http/Connection.java + (receiveReply): Add the null header containing the reply of the server. + (getHeaderField, getHeaderFieldKey): Check whether the connection has + already been established. + +2003-12-27 Guilhem Lavaux + * java/io/CharArrayReader.java (read): It should throw IndexOutOfBoundsException and not ArrayIndexOutOfBoundsException (see mauve). Index: gnu/java/net/protocol/http/Connection.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/Connection.java,v retrieving revision 1.7 diff -u -r1.7 Connection.java --- gnu/java/net/protocol/http/Connection.java 27 Dec 2003 12:58:35 -0000 1.7 +++ gnu/java/net/protocol/http/Connection.java 27 Dec 2003 16:21:36 -0000 @@ -255,6 +255,8 @@ || (line.length() < (idx + 6))) throw new IOException ("Server reply was unparseable: " + saveline); + headers.addHeaderField (null, line); + line = line.substring (idx + 1); String code = line.substring (0, 3); @@ -420,6 +422,16 @@ */ public String getHeaderField(int n) { + if (!connected) + try + { + connect(); + } + catch (IOException e) + { + return null; + } + return headers.getHeaderFieldValueByIndex (n); } @@ -434,6 +446,16 @@ */ public String getHeaderFieldKey(int n) { + if (!connected) + try + { + connect(); + } + catch (IOException e) + { + return null; + } + return headers.getHeaderFieldKeyByIndex (n); } } --------------090003020805070803070308-- From MAILER-DAEMON Sat Dec 27 12:37:05 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaIN7-0004Zq-2k for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 12:37:05 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaIN3-0004YP-LF for commit-classpath@gnu.org; Sat, 27 Dec 2003 12:37:01 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaIMX-000499-Nx for commit-classpath@gnu.org; Sat, 27 Dec 2003 12:37:00 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaIMW-00045s-RA for commit-classpath@gnu.org; Sat, 27 Dec 2003 12:36:28 -0500 Received: from slauerhoff.wildebeest.org ([192.168.1.27] helo=localhost ident=mail) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AaHOr-0000vj-00; Sat, 27 Dec 2003 17:34:49 +0100 Received: from mark by localhost with local (Exim 3.36 #1 (Debian)) id 1AaHP0-00067t-00; Sat, 27 Dec 2003 17:34:58 +0100 From: Mark Wielaard To: Jeroen Frijters In-Reply-To: <788B535AB1F9CB49BB9C229372B50ACC04C742@LEMBU.sumatrasoftware.com> References: <788B535AB1F9CB49BB9C229372B50ACC04C742@LEMBU.sumatrasoftware.com> Content-Type: multipart/mixed; boundary="=-U/BhmQVQvoaDkL30pmgy" Message-Id: <1072542896.846.63.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 27 Dec 2003 17:34:57 +0100 Sender: Mark Wielaard Cc: commit-classpath@gnu.org Subject: Re: [PATCH] java.lang.Runtime split X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 17:37:02 -0000 --=-U/BhmQVQvoaDkL30pmgy Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, On Sat, 2003-12-27 at 11:50, Jeroen Frijters wrote: > I committed the split of java.lang.Runtime into java.lang.Runtime and > java.lang.VMRuntime. Thanks. But a few suggestions/tips: - Also announce this on the main classpath list so people know the discussion period is over and they now have to update their VMs. - Use cvs diff -N when files are added/removed so they show up in the patch. This is nicer for people reading the list so they don't have to cvs up to see any new files. - When adding/(re)moving files don't forget to update the Makefile.am EXTRA_DIST entries. They tell the build system which files should be included in a release tar ball. - We do now have a way to autogenerate the .h files. Made the following patch to fix that. Which I will commit. 2003-12-27 Mark Wielaard * include/Makefile.am: Add java_lang_VMRuntime.h generation rule. * include/java_lang_VMRuntime.h: Regenerated. * java/lang/Makefile.am (EXTRA_DIST): Add Runtime.java. * vm/reference/java/lang/Makefile.am: Remove Runtime.java, add VMRuntime.java. This does show a problem with autogenerated files though. My autogenerated version is different from yours. Which javah program did you use to generate your version with? I used gcjh (GCC) 3.3.3 20031206 (prerelease) (Debian). Maybe we shouldn't include them in CVS but autogenerate them always? In the past the free javah programs were buggy so you sometimes had to hand-edit the result, but that was a long time ago. For VMRuntime it isn't a real issue yet since we don't actually have any native (JNI/Posix) implementations yet. Although I would like to have them. Tips for all classpath hackers: - Use configure --enable-maintainer-mode --enable-regen-headers This will rerun the autotools when necessary and shows when include headers are/should be regenerated. - make distcheck Makes a real distribution (twice) and checks that all necessary files are included/generated. Makes sure you don't forget to update Makefile.am EXTRA_DIST entries. Cheers, Mark --=-U/BhmQVQvoaDkL30pmgy Content-Disposition: inline; filename=runtime.diff Content-Type: text/x-patch; name=runtime.diff; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 PyBydW50aW1lLmRpZmYNCkluZGV4OiBpbmNsdWRlL01ha2VmaWxlLmFtDQo9PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpS Q1MgZmlsZTogL2N2c3Jvb3QvY2xhc3NwYXRoL2NsYXNzcGF0aC9pbm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UyBmaWxl OiAvY3Zzcm9vdC9jbGFzc3BhdGgvY2xhc3NwYXRoL3ZtL3JlZmVyZW5jZS9qYXZhL2xhbmcvTWFr ZWZpbGUuYW0sdg0KcmV0cmlldmluZyByZXZpc2lvbiAxLjcNCmRpZmYgLXUgLXIxLjcgTWFrZWZp bGUuYW0NCi0tLSB2bS9yZWZlcmVuY2UvamF2YS9sYW5nL01ha2VmaWxlLmFtCTI1IFNlcCAyMDAz IDE2OjA0OjE2IC0wMDAwCTEuNw0KKysrIHZtL3JlZmVyZW5jZS9qYXZhL2xhbmcvTWFrZWZpbGUu YW0JMjcgRGVjIDIwMDMgMTY6MTc6MTYgLTAwMDANCkBAIC0zLDEyICszLDEyIEBADQogU1VCRElS UyA9IHJlZmxlY3QNCiANCiBFWFRSQV9ESVNUID0gXA0KLVJ1bnRpbWUuamF2YSBcDQogVk1DbGFz cy5qYXZhIFwNCiBWTUNsYXNzTG9hZGVyLmphdmEgXA0KIFZNRG91YmxlLmphdmEgXA0KIFZNRmxv YXQuamF2YSBcDQogVk1PYmplY3QuamF2YSBcDQorVk1SdW50aW1lLmphdmEgXA0KIFZNU2VjdXJp dHlNYW5hZ2VyLmphdmEgXA0KIFZNU3RyaW5nLmphdmEgXA0KIFZNU3lzdGVtLmphdmEgXA0K --=-U/BhmQVQvoaDkL30pmgy-- From MAILER-DAEMON Sat Dec 27 13:29:04 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaJBQ-0006Qm-CQ for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 13:29:04 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaJBN-0006QN-HV for commit-classpath@gnu.org; Sat, 27 Dec 2003 13:29:01 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaJAr-0006Gs-UH for commit-classpath@gnu.org; Sat, 27 Dec 2003 13:29:00 -0500 Received: from [62.177.154.238] (helo=lembu.sumatrasoftware.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaJAr-0006Gp-JP for commit-classpath@gnu.org; Sat, 27 Dec 2003 13:28:29 -0500 Date: Sat, 27 Dec 2003 18:13:55 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message-ID: <788B535AB1F9CB49BB9C229372B50ACC04C743@LEMBU.sumatrasoftware.com> Content-class: urn:content-classes:message X-MS-Has-Attach: X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0 X-MS-TNEF-Correlator: Thread-Topic: [PATCH] java.lang.Runtime split Thread-Index: AcPMl1+0c/IxEHaKQxC1JCRqIAl7CQABDzyg From: "Jeroen Frijters" To: "Mark Wielaard" Cc: commit-classpath@gnu.org Subject: RE: [PATCH] java.lang.Runtime split X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 18:29:02 -0000 Hi,=20 Mark Wielaard wrote: > Thanks. But a few suggestions/tips: Thanks. I'll try to do better next time. > This does show a problem with autogenerated files though. > My autogenerated version is different from yours. > Which javah program did you use to generate your version with? I manually changed the existing java_lang_Runtime.h, but you're right it was incorrect. Your new version looks much better. > I used gcjh (GCC) 3.3.3 20031206 (prerelease) (Debian). > Maybe we shouldn't include them in CVS but autogenerate them always? I just looked and some of the other header files are incorrect as well. So at the very least it would be a good idea to regenerate them all, but I would be in favor of removing them from cvs altogether. Regards, Jeroen From MAILER-DAEMON Sat Dec 27 16:23:59 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaLuh-0000jW-C0 for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 16:23:59 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaLue-0000in-D9 for commit-classpath@gnu.org; Sat, 27 Dec 2003 16:23:56 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaLu8-0000d1-DY for commit-classpath@gnu.org; Sat, 27 Dec 2003 16:23:55 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AaLu8-0000bE-63 for commit-classpath@gnu.org; Sat, 27 Dec 2003 16:23:24 -0500 Received: from [212.6.122.106] (helo=mail1.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1AaKvF-0003Y6-O4 for commit-classpath@gnu.org; Sat, 27 Dec 2003 15:20:29 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-64-171.ewetel.net [80.228.64.171]) by mail1.ewetel.de (8.12.1/8.12.9) with ESMTP id hBRKKRl1007997 for ; Sat, 27 Dec 2003 21:20:27 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AaKyV-0005pJ-00 for ; Sat, 27 Dec 2003 21:23:51 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sat, 27 Dec 2003 21:23:30 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Cpe7/MOaGCS++ZE" Message-Id: <200312272123.31338.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: gnu.java.net.protocol.http.Connection X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 21:23:57 -0000 --Boundary-00=_Cpe7/MOaGCS++ZE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge gnu.java.net.protocol.http.Connection more with libgcj. Michael --Boundary-00=_Cpe7/MOaGCS++ZE Content-Type: text/x-diff; charset="us-ascii"; name="http.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="http.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1725 diff -u -b -B -r1.1725 ChangeLog --- ChangeLog 27 Dec 2003 16:38:43 -0000 1.1725 +++ ChangeLog 27 Dec 2003 20:13:29 -0000 @@ -1,3 +1,11 @@ +2003-12-27 Michael Koch + + * gnu/java/net/protocol/http/Connection.java + (setRequestProperty): New method. + (getRequestProperty): New method. + (getHeaderField): Reformated. + (getHeaderFieldKey): Reformated. + 2003-12-27 Mark Wielaard * include/Makefile.am: Add java_lang_VMRuntime.h generation rule. Index: gnu/java/net/protocol/http/Connection.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/Connection.java,v retrieving revision 1.8 diff -u -b -B -r1.8 Connection.java --- gnu/java/net/protocol/http/Connection.java 27 Dec 2003 16:29:52 -0000 1.8 +++ gnu/java/net/protocol/http/Connection.java 27 Dec 2003 20:13:29 -0000 @@ -134,6 +134,22 @@ doOutput = false; } + public void setRequestProperty(String key, String value) + { + if (connected) + throw new IllegalAccessError("Connection already established."); + + requestProperties.put(key, value); + } + + public String getRequestProperty(String key) + { + if (connected) + throw new IllegalAccessError("Connection already established."); + + return (String) requestProperties.get(key); + } + /** * Connects to the remote host, sends the request, and parses the reply * code and header information returned @@ -427,7 +443,7 @@ { connect(); } - catch (IOException e) + catch (IOException x) { return null; } @@ -451,7 +467,7 @@ { connect(); } - catch (IOException e) + catch (IOException x) { return null; } --Boundary-00=_Cpe7/MOaGCS++ZE-- From MAILER-DAEMON Sat Dec 27 16:34:49 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaM5B-0005YN-8A for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 16:34:49 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaM59-0005YG-CY for commit-classpath@gnu.org; Sat, 27 Dec 2003 16:34:47 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaM4c-0005Vx-7r for commit-classpath@gnu.org; Sat, 27 Dec 2003 16:34:46 -0500 Received: from [212.6.122.106] (helo=mail1.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaM4b-0005Vu-SD for commit-classpath@gnu.org; Sat, 27 Dec 2003 16:34:13 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-64-171.ewetel.net [80.228.64.171]) by mail1.ewetel.de (8.12.1/8.12.9) with ESMTP id hBRKWjl1012250 for ; Sat, 27 Dec 2003 21:32:45 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AaLAP-0005ql-00 for ; Sat, 27 Dec 2003 21:36:09 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sat, 27 Dec 2003 21:35:49 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_l0e7/9ep3V2sRo7" Message-Id: <200312272135.49387.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: gnu.java.net.protocol.http.Connection X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 21:34:47 -0000 --Boundary-00=_l0e7/9ep3V2sRo7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to remove two methods from gnu.java.net.protocol.http.Connection again. These are already in java.net.URLConnection. Michael --Boundary-00=_l0e7/9ep3V2sRo7 Content-Type: text/x-diff; charset="us-ascii"; name="http.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="http.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1726 diff -u -b -B -r1.1726 ChangeLog --- ChangeLog 27 Dec 2003 20:15:16 -0000 1.1726 +++ ChangeLog 27 Dec 2003 20:29:57 -0000 @@ -1,6 +1,12 @@ 2003-12-27 Michael Koch * gnu/java/net/protocol/http/Connection.java + (getRequestProperty): Removed. + (setRequestProperty): Removed. + +2003-12-27 Michael Koch + + * gnu/java/net/protocol/http/Connection.java (setRequestProperty): New method. (getRequestProperty): New method. (getHeaderField): Reformated. Index: gnu/java/net/protocol/http/Connection.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/Connection.java,v retrieving revision 1.9 diff -u -b -B -r1.9 Connection.java --- gnu/java/net/protocol/http/Connection.java 27 Dec 2003 20:15:16 -0000 1.9 +++ gnu/java/net/protocol/http/Connection.java 27 Dec 2003 20:29:57 -0000 @@ -134,22 +134,6 @@ doOutput = false; } - public void setRequestProperty(String key, String value) - { - if (connected) - throw new IllegalAccessError("Connection already established."); - - requestProperties.put(key, value); - } - - public String getRequestProperty(String key) - { - if (connected) - throw new IllegalAccessError("Connection already established."); - - return (String) requestProperties.get(key); - } - /** * Connects to the remote host, sends the request, and parses the reply * code and header information returned --Boundary-00=_l0e7/9ep3V2sRo7-- From MAILER-DAEMON Sat Dec 27 17:02:00 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaMVU-0002ew-Ey for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 17:02:00 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaMVS-0002ec-3d for commit-classpath@gnu.org; Sat, 27 Dec 2003 17:01:58 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaMUw-0002Yw-Gy for commit-classpath@gnu.org; Sat, 27 Dec 2003 17:01:57 -0500 Received: from [62.108.28.95] (helo=nescio.wildebeest.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaMUw-0002Yr-22 for commit-classpath@gnu.org; Sat, 27 Dec 2003 17:01:26 -0500 Received: from slauerhoff.wildebeest.org ([192.168.1.27] helo=localhost ident=mail) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 1AaLXI-0001Nl-00 for ; Sat, 27 Dec 2003 21:59:48 +0100 Received: from mark by localhost with local (Exim 3.36 #1 (Debian)) id 1AaLXS-0002P1-00 for ; Sat, 27 Dec 2003 21:59:58 +0100 From: Mark Wielaard To: commit-classpath@gnu.org In-Reply-To: <20031226180432.GA6669@mail.konqueror.de> References: <200312261829.21777.konqueror@gmx.de> <1072460429.23020.164.camel@elsschot.wildebeest.org> <20031226180432.GA6669@mail.konqueror.de> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1072558797.844.156.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 27 Dec 2003 21:59:57 +0100 Sender: Mark Wielaard Subject: Re: FYI: Patch: java.awt.image.PixelGrabber X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 22:01:58 -0000 Hi, On Fri, 2003-12-26 at 19:04, Michael Koch wrote: > On Fri, Dec 26, 2003 at 06:40:29PM +0100, Mark Wielaard wrote: > > > > But the actual diff only lists some added asserts. > > Could you double check this patch? > > Thx for catching this. I relied too much on the cvs changelog of libgcj. > The patch was already merged, without the assert. The reason for this is > not documentated in the archive. At least I dont found it. > > Should I just rework the changelog entry or what is your preferred > solution for this ? Saw that you already backed it out since the asserts didn't work nicely with the default jikes compile. Just keep the ChangeLog entries as they are. Changing the ChangeLog file in the past always feels like changing history. And it is just a double entry now. Lets keep asserts out of Classpath sources for now since by default not all compilers support it. But I do like to see them in the future if we can actually use them more then in one or two spots. Cheers, Mark From MAILER-DAEMON Sat Dec 27 18:53:21 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaOFE-0004RO-Pk for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 18:53:20 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaOFC-0004Qa-3o for commit-classpath@gnu.org; Sat, 27 Dec 2003 18:53:18 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaOEX-0003sa-RP for commit-classpath@gnu.org; Sat, 27 Dec 2003 18:53:09 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AaOEX-0003jy-90 for commit-classpath@gnu.org; Sat, 27 Dec 2003 18:52:37 -0500 Received: from [212.6.122.116] (helo=mail2.ewetel.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1AaNGS-0004Wt-Pv for commit-classpath@gnu.org; Sat, 27 Dec 2003 17:50:32 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-64-171.ewetel.net [80.228.64.171]) by mail2.ewetel.de (8.12.1/8.12.9) with ESMTP id hBRMoUUa002556 for ; Sat, 27 Dec 2003 23:50:31 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AaNJk-00067t-00 for ; Sat, 27 Dec 2003 23:53:56 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sat, 27 Dec 2003 23:53:34 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_u1g7/ZpkT6YDlXK" Message-Id: <200312272353.34832.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.io.ObjectStreamField X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 23:53:19 -0000 --Boundary-00=_u1g7/ZpkT6YDlXK Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to merge documentation with libgcj. Michael --Boundary-00=_u1g7/ZpkT6YDlXK Content-Type: text/x-diff; charset="us-ascii"; name="io.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="io.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1727 diff -u -b -B -r1.1727 ChangeLog --- ChangeLog 27 Dec 2003 20:30:26 -0000 1.1727 +++ ChangeLog 27 Dec 2003 22:48:19 -0000 @@ -1,5 +1,10 @@ 2003-12-27 Michael Koch + * java/io/ObjectStreamField.java + (isShared): Documentation added. + +2003-12-27 Michael Koch + * gnu/java/net/protocol/http/Connection.java (getRequestProperty): Removed. (setRequestProperty): Removed. Index: java/io/ObjectStreamField.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamField.java,v retrieving revision 1.11 diff -u -b -B -r1.11 ObjectStreamField.java --- java/io/ObjectStreamField.java 2 Dec 2003 18:35:52 -0000 1.11 +++ java/io/ObjectStreamField.java 27 Dec 2003 22:48:19 -0000 @@ -206,6 +206,10 @@ } /** + * This method returns whether the field represented by this object is + * unshared or not. + * + * @return Tells if this field is unshared or not. */ public boolean isUnshared () { --Boundary-00=_u1g7/ZpkT6YDlXK-- From MAILER-DAEMON Sat Dec 27 19:03:55 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaOPT-0008Sv-2m for mharc-commit-classpath@gnu.org; Sat, 27 Dec 2003 19:03:55 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaOPQ-0008S2-2X for commit-classpath@gnu.org; Sat, 27 Dec 2003 19:03:52 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaOOq-0008Hz-SN for commit-classpath@gnu.org; Sat, 27 Dec 2003 19:03:48 -0500 Received: from [212.6.122.106] (helo=mail1.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AaOOq-0008Hh-6d for commit-classpath@gnu.org; Sat, 27 Dec 2003 19:03:16 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-64-171.ewetel.net [80.228.64.171]) by mail1.ewetel.de (8.12.1/8.12.9) with ESMTP id hBRN1ml1005927 for ; Sun, 28 Dec 2003 00:01:48 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AaNUf-0006EY-00 for ; Sun, 28 Dec 2003 00:05:13 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sun, 28 Dec 2003 00:04:51 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_TAh7//oqRMoA3km" Message-Id: <200312280004.51957.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: java.nio.channels.FileChannelImpl X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 00:03:53 -0000 --Boundary-00=_TAh7//oqRMoA3km Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to fix a bug in java.nio.channels.FileChannelImpl. Michael --Boundary-00=_TAh7//oqRMoA3km Content-Type: text/x-diff; charset="us-ascii"; name="fc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fc.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1728 diff -u -b -B -r1.1728 ChangeLog --- ChangeLog 27 Dec 2003 22:48:58 -0000 1.1728 +++ ChangeLog 27 Dec 2003 22:59:22 -0000 @@ -1,3 +1,8 @@ +2003-12-28 Michael Koch + + * java/nio/channels/FileChannelImpl.java + (implRead): Only put data into buffer when data was read. + 2003-12-27 Michael Koch * java/io/ObjectStreamField.java Index: java/nio/channels/FileChannelImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/channels/FileChannelImpl.java,v retrieving revision 1.3 diff -u -b -B -r1.3 FileChannelImpl.java --- java/nio/channels/FileChannelImpl.java 20 Oct 2003 15:32:56 -0000 1.3 +++ java/nio/channels/FileChannelImpl.java 27 Dec 2003 22:59:22 -0000 @@ -169,6 +169,8 @@ byte[] buffer = new byte [dst.remaining ()]; result = implRead (buffer, 0, buffer.length); + + if (result > 0) dst.put (buffer, 0, result); return result; --Boundary-00=_TAh7//oqRMoA3km-- From MAILER-DAEMON Sun Dec 28 06:18:06 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AaYvt-0008Im-78 for mharc-commit-classpath@gnu.org; Sun, 28 Dec 2003 06:18:05 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AaYvp-0008G8-9L for commit-classpath@gnu.org; Sun, 28 Dec 2003 06:18:01 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AaYur-0007lE-8S for commit-classpath@gnu.org; Sun, 28 Dec 2003 06:17:33 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AaYud-0007ee-Mz for commit-classpath@gnu.org; Sun, 28 Dec 2003 06:16:47 -0500 Received: from [62.4.16.100] (helo=kraid.nerim.net) by mx20.gnu.org with esmtp (Exim 4.24) id 1AaXno-0007jH-WF for commit-classpath@gnu.org; Sun, 28 Dec 2003 05:05:41 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 630E841163 for ; Sun, 28 Dec 2003 11:05:28 +0100 (CET) Message-ID: <3FEEAB07.3050508@kaffe.org> Date: Sun, 28 Dec 2003 11:05:59 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090508020806050508040301" Subject: FYI: java.io.LineNumberReader X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 11:18:02 -0000 This is a multi-part message in MIME format. --------------090508020806050508040301 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Here is a patch to improve error reporting in java.io.LineNumberReader. skip() also eats the right number of character now (maybe it can be improved). Guilhem. --------------090508020806050508040301 Content-Type: text/plain; name="patch_line" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_line" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1724 diff -u -r1.1724 ChangeLog --- ChangeLog 27 Dec 2003 16:29:52 -0000 1.1724 +++ ChangeLog 28 Dec 2003 10:04:34 -0000 @@ -1,3 +1,11 @@ +2003-12-28 Guilhem Lavaux + + * java/io/LineNumberReader.java + (mark): Improved error checking. + (read): Likewise. + (skip): Likewise. Skip is now really eating the specified number of + characters. + 2003-12-27 Guilhem Lavaux * gnu/java/net/protocol/http/Connection.java Index: java/io/LineNumberReader.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/LineNumberReader.java,v retrieving revision 1.11 diff -u -r1.11 LineNumberReader.java --- java/io/LineNumberReader.java 31 Aug 2003 19:45:06 -0000 1.11 +++ java/io/LineNumberReader.java 28 Dec 2003 10:04:34 -0000 @@ -155,6 +155,9 @@ */ public void mark(int readLimit) throws IOException { + if (readLimit < 0) + throw new IllegalArgumentException("Read-ahead limit is negative"); + synchronized (lock) { // This is basically the same as BufferedReader.mark. @@ -265,9 +268,17 @@ * @return The actual number of chars read, or -1 if end of stream * * @exception IOException If an error occurs. + * @exception NullPointerException If buf is null (in any case). + * @exception IndexOutOfBoundsException If buffer parameters (offset and + * count) lies outside of the buffer capacity. */ public int read(char[] buf, int offset, int count) throws IOException { + if (buf == null) + throw new NullPointerException(); + if (offset + count > buf.length || offset < 0) + throw new IndexOutOfBoundsException(); + if (count <= 0) { if (count < 0) @@ -376,14 +387,17 @@ */ public long skip (long count) throws IOException { - if (count <= 0) + if (count < 0) + throw new IllegalArgumentException("skip() value is negative"); + if (count == 0) return 0; int skipped; - + char[] buf = new char[1]; + for (skipped = 0; skipped < count; skipped++) { - int ch = read(); + int ch = read(buf, 0, 1); if (ch < 0) break; --------------090508020806050508040301-- From MAILER-DAEMON Sun Dec 28 09:37:59 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aac3L-0000ap-IM for mharc-commit-classpath@gnu.org; Sun, 28 Dec 2003 09:37:59 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aac3J-0000Yw-6n for commit-classpath@gnu.org; Sun, 28 Dec 2003 09:37:57 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aac2n-0000KK-RT for commit-classpath@gnu.org; Sun, 28 Dec 2003 09:37:56 -0500 Received: from [62.4.16.100] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aac2n-0000Jv-9N for commit-classpath@gnu.org; Sun, 28 Dec 2003 09:37:25 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id BE65C413D8 for ; Sun, 28 Dec 2003 14:35:55 +0100 (CET) Message-ID: <3FEEDC5A.2060302@kaffe.org> Date: Sun, 28 Dec 2003 14:36:26 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------030301080302020007010705" Subject: FYI: java.io.LineNumberReader X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 14:37:57 -0000 This is a multi-part message in MIME format. --------------030301080302020007010705 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, This new patch changes the logic of how lines are counted by LineNumberReader. It solves failures for the new mauve test (LineNumberReader.Test2). Guilhem. --------------030301080302020007010705 Content-Type: text/plain; name="patch_line" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_line" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1730 diff -u -r1.1730 ChangeLog --- ChangeLog 28 Dec 2003 10:14:10 -0000 1.1730 +++ ChangeLog 28 Dec 2003 10:52:02 -0000 @@ -1,6 +1,16 @@ 2003-12-28 Guilhem Lavaux * java/io/LineNumberReader.java + (countLines): Removed. + (fill): New private method. + (mark): Changed logic to use savedLineNumber and matchedNewLine. + (reset): Likewise. + (read): Likewise. + (skipRedundantLF): Likewise. + +2003-12-28 Guilhem Lavaux + + * java/io/LineNumberReader.java (mark): Improved error checking. (read): Likewise. (skip): Likewise. Skip is now really eating the specified number of Index: java/io/LineNumberReader.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/LineNumberReader.java,v retrieving revision 1.12 diff -u -r1.12 LineNumberReader.java --- java/io/LineNumberReader.java 28 Dec 2003 10:14:10 -0000 1.12 +++ java/io/LineNumberReader.java 28 Dec 2003 10:52:02 -0000 @@ -54,7 +54,8 @@ * * @author Per Bothner * @author Aaron M. Renn (arenn@urbanophile.com) - * @date April 22, 1998. + * @author Guilhem Lavaux + * @date December 28, 2003. */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 beta from http://www.javasoft.com. @@ -71,6 +72,10 @@ { /** The current line number. */ private int lineNumber; + /** Whether we already found a new line in the former call. */ + private boolean matchedNewLine; + /** The saved line number when calling mark() */ + private int savedLineNumber; /** * Create a new LineNumberReader that reads from the @@ -117,20 +122,6 @@ this.lineNumber = lineNumber; } - private static int countLines (char[] buffer, int off, int len) - { - int count = 0; - char prev = '\0'; - for (int i = 0; i < len; i++) - { - char ch = buffer[i+off]; - if ((ch == '\n' && prev != '\r') || ch == '\r') - count++; - prev = ch; - } - return count; - } - /** * This method marks a position in the input to which the stream can be * "reset" char calling the reset() method. The parameter @@ -165,11 +156,12 @@ // save that 'r', in case the next character is a '\n'. if (pos + readLimit > limit) { - int saveCR = (pos > 0 && buffer[pos-1] == '\r') ? 1 : 0; + int saveCR = matchedNewLine ? 1 : 0; char[] old_buffer = buffer; if (readLimit > limit) buffer = new char[saveCR + readLimit]; int copy_start = pos - saveCR; + savedLineNumber = lineNumber; limit -= copy_start; System.arraycopy(old_buffer, copy_start, buffer, 0, limit); pos = saveCR; @@ -195,15 +187,35 @@ { if (markPos < 0) throw new IOException("mark never set or invalidated"); - if (markPos > 0 && pos > markPos && buffer[markPos-1] == '\r' - && buffer[markPos] == '\n') - lineNumber--; - lineNumber -= countLines(buffer, markPos, pos - markPos); + lineNumber = savedLineNumber; pos = markPos; + matchedNewLine = (markPos > 0 && buffer[markPos-1] == '\r'); } } /** + * This private method fills the input buffer whatever pos is. + * Consequently pos should be checked before calling this method. + * + * @return the number of bytes actually read from the input stream or + * -1 if end of stream. + * @exception IOException If an error occurs. + */ + private int fill() throws IOException + { + if (markPos >= 0 && limit == buffer.length) + markPos = -1; + if (markPos < 0) + pos = limit = 0; + int count = in.read(buffer, limit, buffer.length - limit); + if (count <= 0) + return -1; + limit += count; + + return count; + } + + /** * This method reads an unsigned char from the input stream and returns it * as an int in the range of 0-65535. This method will return -1 if the * end of the stream has been reached. @@ -226,30 +238,24 @@ synchronized (lock) { skipRedundantLF(); - if (pos >= limit) - { - if (markPos >= 0 && limit == buffer.length) - markPos = -1; - if (markPos < 0) - pos = limit = 0; - int count = in.read(buffer, limit, buffer.length - limit); - if (count <= 0) - return -1; - limit += count; - } + if (pos >= limit && fill() < 0) + return -1; char ch = buffer[pos++]; - if (ch == '\r' || ch == '\n') + + if ((matchedNewLine = (ch == '\r')) || ch == '\n') { lineNumber++; return '\n'; } + matchedNewLine = false; return (int) ch; } } /** * This method reads chars from a stream and stores them into a caller - * supplied buffer. It starts storing data at index offset into * the buffer and attemps to read len chars. This method can + * supplied buffer. It starts storing data at index offset into + * the buffer and attemps to read len chars. This method can * return before reading the number of chars requested. The actual number * of chars read is returned as an int. A -1 is returned to indicated the * end of the stream. @@ -276,6 +282,7 @@ { if (buf == null) throw new NullPointerException(); + if (offset + count > buf.length || offset < 0) throw new IndexOutOfBoundsException(); @@ -285,37 +292,39 @@ throw new IndexOutOfBoundsException(); return 0; } + synchronized (lock) { - int first = read(); - if (first < 0) + if (pos >= limit && fill() < 0) return -1; + int start_offset = offset; - buf[offset++] = (char) first; - if (buffer[pos-1] == '\r' && pos < limit && buffer[pos] == '\n') - pos++; - count--; + boolean matched = matchedNewLine; + while (count-- > 0 && pos < limit) { char ch = buffer[pos++]; if (ch == '\r') { lineNumber++; - ch = '\n'; - if (pos < limit && buffer[pos] == '\n') - pos++; + matched = true; } - else if (ch == '\n') + else if (ch == '\n' && !matched) lineNumber++; + else + matched = false; + buf[offset++] = ch; } + + matchedNewLine = matched; return offset - start_offset; } } private void skipRedundantLF() throws IOException { - if (pos > 0 && buffer[pos-1] == '\r') + if (pos > 0 && matchedNewLine) { if (pos < limit) { // fast case @@ -323,16 +332,14 @@ pos++; } else - { // use read() to deal with the general case. - // Set pos and limit to zero to avoid infinite recursion in read. - // May need to invalidate markPos if we've exceeded the buffer. - if (pos >= buffer.length) - markPos = -1; - pos = limit = 0; - int ch = read(); - if (ch >= 0 && ch != '\n') - pos--; + { // check whether the next buffer begins with '\n'. + // in that case kill the '\n'. + if (fill() <= 0) + return; + if (buffer[pos] == '\n') + pos++; } + matchedNewLine = true; } } @@ -366,8 +373,9 @@ if (pos > limit) --pos; - int ch; - if (pos > 0 && ((ch = buffer[pos - 1]) == '\n' || ch == '\r')) + // The only case where you mustn't increment the line number is you are + // at the EOS. + if (str != null) lineNumber = tmpLineNumber + 1; return str; @@ -394,7 +402,7 @@ int skipped; char[] buf = new char[1]; - + for (skipped = 0; skipped < count; skipped++) { int ch = read(buf, 0, 1); --------------030301080302020007010705-- From MAILER-DAEMON Sun Dec 28 13:17:55 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AafUB-0004tO-Dd for mharc-commit-classpath@gnu.org; Sun, 28 Dec 2003 13:17:55 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AafU9-0004t3-JQ for commit-classpath@gnu.org; Sun, 28 Dec 2003 13:17:53 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AafTd-0004Vo-5F for commit-classpath@gnu.org; Sun, 28 Dec 2003 13:17:52 -0500 Received: from [62.4.16.100] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AafTc-0004Sz-FN for commit-classpath@gnu.org; Sun, 28 Dec 2003 13:17:20 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id A5B5941450 for ; Sun, 28 Dec 2003 18:15:48 +0100 (CET) Message-ID: <3FEF0FE2.7010208@kaffe.org> Date: Sun, 28 Dec 2003 18:16:18 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------070100060007030801080905" Subject: FYI: Serialization X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 18:17:54 -0000 This is a multi-part message in MIME format. --------------070100060007030801080905 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Here is a patch which merges kaffe serialization code into classpath. The next one will reindent the code for clarity. Guilhem. --------------070100060007030801080905 Content-Type: text/plain; name="patch_stream" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_stream" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1731 diff -u -r1.1731 ChangeLog --- ChangeLog 28 Dec 2003 13:45:15 -0000 1.1731 +++ ChangeLog 28 Dec 2003 17:13:48 -0000 @@ -1,5 +1,27 @@ 2003-12-28 Guilhem Lavaux + * java/io/ObjectOutputStream.java + (writeClassDescriptor): Externalizable class must also write their + hierarchy. + (putFields): Added some text message for an exception. + + * java/io/ObjectInputStream.java + (readClassDescriptor): Documented. Better field checking. + (defaultReadObject): Readjusted messages in exceptions. + (currentLoader): Documented. + (inputGetObjectStreamClasses): Changed indentation. + (readFields): Documented. Changed logic to improve error reporting and + behaviour compared to the JDK. + (readFields): Fixed behaviour. + (getField): Documented. Fixed behaviour. + (callReadMethod): Invalidate read fields. + + * java/io/ObjectStreamClass.java + (setFields): Fix to avoid a NullPointerException. + (getSerialPersistentFields): Documented. Improved modifier checking. + +2003-12-28 Guilhem Lavaux + * java/io/LineNumberReader.java (countLines): Removed. (fill): New private method. Index: java/io/ObjectInputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectInputStream.java,v retrieving revision 1.33 diff -u -r1.33 ObjectInputStream.java --- java/io/ObjectInputStream.java 2 Dec 2003 18:35:51 -0000 1.33 +++ java/io/ObjectInputStream.java 28 Dec 2003 17:13:49 -0000 @@ -47,6 +47,7 @@ import java.util.Hashtable; import java.util.Vector; + import gnu.java.io.ObjectIdentityWrapper; import gnu.java.lang.reflect.TypeSignature; import java.lang.reflect.Field; @@ -417,6 +418,22 @@ return ret_val; } + /** + * This method reads a class descriptor from the real input stream + * and use these data to create a new instance of ObjectStreamClass. + * Fields are sorted and ordered for the real read which occurs for + * each instance of the described class. Be aware that if you call that + * method you must ensure that the stream is synchronized, in the other + * case it may be completely desynchronized. + * + * @return A new instance of ObjectStreamClass containing the freshly + * created descriptor. + * @throws ClassNotFoundException if the required class to build the + * descriptor has not been found in the system. + * @throws IOException An input/output error occured. + * @throws InvalidClassException If there was a compatibility problem + * between the class present in the system and the serialized class. + */ protected ObjectStreamClass readClassDescriptor () throws ClassNotFoundException, IOException { @@ -443,22 +460,44 @@ dumpElementln (field_name); String class_name; + // If the type code is an array or an object we must + // decode a String here. In the other case we convert + // the type code and pass it to ObjectStreamField. + // Type codes are decoded by gnu.java.lang.reflect.TypeSignature. if (type_code == 'L' || type_code == '[') class_name = (String)readObject (); else class_name = String.valueOf (type_code); - // There're many cases you can't get java.lang.Class from - // typename if your context class loader can't load it, - // then use typename to construct the field fields[i] = - new ObjectStreamField (field_name, class_name); + new ObjectStreamField(field_name, class_name, currentLoader()); } - Class clazz = resolveClass (osc); + /* Now that fields have been read we may resolve the class + * (and read annotation if needed). */ + Class clazz = resolveClass(osc); + + for (int i = 0; i < field_count; i++) + { + Field f; + + try + { + f = clazz.getDeclaredField(fields[i].getName()); + if (f != null && !f.getType().equals(fields[i].getType())) + throw new InvalidClassException + ("invalid field type for " + fields[i].getName() + " in class " + + name + " (requested was \"" + fields[i].getType() + + " and found \"" + f.getType() + "\")"); + } + catch (NoSuchFieldException _) + { + } + } + boolean oldmode = setBlockDataMode (true); - osc.setClass (clazz, lookupClass (clazz.getSuperclass())); - classLookupTable.put (clazz, osc); + osc.setClass (clazz, lookupClass(clazz.getSuperclass())); + classLookupTable.put(clazz, osc); setBlockDataMode (oldmode); return osc; @@ -487,10 +526,13 @@ throws ClassNotFoundException, IOException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) - throw new NotActiveException ("defaultReadObject called by non-active class and/or object"); + throw new NotActiveException("defaultReadObject called by non-active" + + " class and/or object"); if (fieldsAlreadyRead) - throw new NotActiveException ("defaultReadObject called but fields already read from stream (by defaultReadObject or readFields)"); + throw new NotActiveException("defaultReadObject called but fields " + + "already read from stream (by " + + "defaultReadObject or readFields)"); boolean oldmode = setBlockDataMode(false); readFields (this.currentObject, this.currentObjectStreamClass); @@ -523,10 +565,12 @@ throws InvalidObjectException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) - throw new NotActiveException ("registerValidation called by non-active class and/or object"); + throw new NotActiveException ("registerValidation called by non-active " + +"class and/or object"); if (validator == null) - throw new InvalidObjectException ("attempt to add a null ObjectInputValidation object"); + throw new InvalidObjectException ("attempt to add a null " + +"ObjectInputValidation object"); this.validators.addElement (new ValidatorAndPriority (validator, priority)); @@ -552,16 +596,24 @@ protected Class resolveClass (ObjectStreamClass osc) throws ClassNotFoundException, IOException { - return Class.forName (osc.getName(), true, currentLoader()); + return Class.forName(osc.getName(), true, currentLoader()); } - - private ClassLoader currentLoader () + + /** + * This method invokes the method currentClassLoader for the + * current security manager (or build an empty one if it is not + * present). + * + * @return The most recent non-system ClassLoader on the execution stack. + * @see java.lang.SecurityManager#currentClassLoader() + */ + private ClassLoader currentLoader() { SecurityManager sm = System.getSecurityManager (); if (sm == null) sm = new SecurityManager () {}; - - return currentClassLoader (sm); + + return currentClassLoader(sm); } /** @@ -571,14 +623,14 @@ * the behaviour detected in the JDK by Kaffe's team. * * @param clazz Class to lookup in the hash table or for which - * we must build a descriptor. + * we must build a descriptor. * @return A valid instance of ObjectStreamClass corresponding * to the specified class. */ private ObjectStreamClass lookupClass (Class clazz) { ObjectStreamClass oclazz; - + oclazz = (ObjectStreamClass) classLookupTable.get(clazz); if (oclazz == null) return ObjectStreamClass.lookup (clazz); @@ -590,8 +642,8 @@ * Reconstruct class hierarchy the same way * {@link java.io.ObjectStreamClass.getObjectStreamClasses(java.lang.Class)} does * but using lookupClass instead of ObjectStreamClass.lookup. This - * dup is necessary localize the lookup table. Hopefully some future rewritings will - * be able to prevent this. + * dup is necessary localize the lookup table. Hopefully some future + * rewritings will be able to prevent this. * * @param clazz This is the class for which we want the hierarchy. * @@ -607,23 +659,23 @@ if (osc == null) return new ObjectStreamClass[0]; else - { - Vector oscs = new Vector (); - - while (osc != null) { - oscs.addElement (osc); - osc = osc.getSuper (); - } + Vector oscs = new Vector(); - int count = oscs.size (); - ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; + while (osc != null) + { + oscs.addElement(osc); + osc = osc.getSuper(); + } - for (int i = count - 1; i >= 0; i--) - sorted_oscs[ count - i - 1 ] = (ObjectStreamClass)oscs.elementAt (i); + int count = oscs.size(); + ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[count]; - return sorted_oscs; - } + for (int i = count - 1; i >= 0; i--) + sorted_oscs[count - i - 1] = (ObjectStreamClass) oscs.elementAt(i); + + return sorted_oscs; + } } /** @@ -983,14 +1035,31 @@ throws IOException, IllegalArgumentException; } + /** + * This method should be called by a method called 'readObject' in the + * deserializing class (if present). It cannot (and should not)be called + * outside of it. Its goal is to read all fields in the real input stream + * and keep them accessible through the {@link #GetField} class. Calling + * this method will not alterate the deserializing object. + * + * @return A valid freshly created 'GetField' instance to get access to + * the deserialized stream. + * @throws IOException An input/output exception occured. + * @throws ClassNotFoundException + * @throws NotActiveException + */ public GetField readFields () throws IOException, ClassNotFoundException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) throw new NotActiveException ("readFields called by non-active class and/or object"); + if (prereadFields != null) + return prereadFields; + if (fieldsAlreadyRead) - throw new NotActiveException ("readFields called but fields already read from stream (by defaultReadObject or readFields)"); + throw new NotActiveException ("readFields called but fields already read from" + + " stream (by defaultReadObject or readFields)"); final ObjectStreamClass clazz = this.currentObjectStreamClass; final byte[] prim_field_data = new byte[clazz.primFieldSize]; @@ -1005,7 +1074,7 @@ objs[i] = readObject (); setBlockDataMode (oldmode); - return new GetField () + prereadFields = new GetField() { public ObjectStreamClass getObjectStreamClass () { @@ -1015,7 +1084,31 @@ public boolean defaulted (String name) throws IOException, IllegalArgumentException { - return clazz.getField (name) == null; + ObjectStreamField f = clazz.getField(name); + + /* First if we have a serialized field use the descriptor */ + if (f != null) + { + /* It is in serialPersistentFields but setClass tells us + * it should not be set. This value is defaulted. + */ + if (f.isPersistent() && !f.isToSet()) + return true; + + return false; + } + + /* This is not a serialized field. There should be + * a default value only if the field really exists. + */ + try + { + return (clazz.forClass().getDeclaredField (name) != null); + } + catch (NoSuchFieldException e) + { + throw new IllegalArgumentException (e.getMessage()); + } } public boolean get (String name, boolean defvalue) @@ -1157,24 +1250,76 @@ throws IllegalArgumentException { ObjectStreamField field = clazz.getField (name); + boolean illegal = false; - if (field == null) - return null; - - Class field_type = field.getType (); - - if (type == field_type || - (type == null && ! field_type.isPrimitive ())) - return field; - - throw new IllegalArgumentException ("Field requested is of type " - + field_type.getName () - + ", but requested type was " - + (type == null ? - "Object" : type.getName ())); + try + { + try + { + Class field_type = field.getType(); + + if (type == field_type || + (type == null && !field_type.isPrimitive())) + { + /* See defaulted */ + return field; + } + + illegal = true; + throw new IllegalArgumentException + ("Field requested is of type " + + field_type.getName() + + ", but requested type was " + + (type == null ? "Object" : type.getName())); + } + catch (NullPointerException _) + { + /* Here we catch NullPointerException, because it may + only come from the call 'field.getType()'. If field + is null, we have to return null and classpath ethic + say we must try to avoid 'if (xxx == null)'. + */ + } + catch (IllegalArgumentException e) + { + throw e; + } + + return null; + } + finally + { + /* If this is an unassigned field we should return + * the default value. + */ + if (!illegal && field != null && !field.isToSet() && field.isPersistent()) + return null; + + /* We do not want to modify transient fields. They should + * be left to 0. + */ + try + { + Field f = clazz.forClass().getDeclaredField (name); + if (Modifier.isTransient(f.getModifiers())) + throw new IllegalArgumentException + ("no such field (non transient) " + name); + if (field == null && f.getType() != type) + throw new IllegalArgumentException + ("Invalid requested type for field " + name); + } + catch (NoSuchFieldException e) + { + if (field == null) + throw new IllegalArgumentException(e.getMessage()); + } + + } } }; + fieldsAlreadyRead = true; + return prereadFields; } /** @@ -1369,7 +1514,7 @@ { ObjectStreamField[] stream_fields = stream_osc.fields; ObjectStreamField[] real_fields = - lookupClass (stream_osc.forClass ()).fields; + lookupClass(stream_osc.forClass()).fields; boolean default_initialize, set_value; String field_name = null; @@ -1424,6 +1569,15 @@ } } + if (stream_field.getOffset() < 0) + { + default_initialize = true; + set_value = false; + } + + if (!stream_field.isToSet()) + set_value = false; + try { if (type == Boolean.TYPE) @@ -1571,10 +1725,23 @@ */ private static native ClassLoader currentClassLoader (SecurityManager sm); - private static Field getField (Class klass, String name) + /** + * This method tries to access a precise field called in the + * specified class. Before accessing the field, it tries to + * gain control on this field. If the field is either declared as + * not persistent or transient then it returns null + * immediately. + * + * @param klass Class to get the field from. + * @param name Name of the field to access. + * @return Field instance representing the requested field. + * @throws NoSuchFieldException if the field does not exist. + */ + private Field getField(Class klass, String name) throws java.lang.NoSuchFieldException { final Field f = klass.getDeclaredField(name); + ObjectStreamField sf = lookupClass(klass).getField(name); AccessController.doPrivileged(new PrivilegedAction() { @@ -1584,6 +1751,14 @@ return null; } }); + + /* We do not want to modify transient fields. They should + * be left to 0. + * N.B.: Not valid if the field is in serialPersistentFields. + */ + if (Modifier.isTransient(f.getModifiers()) && !sf.isPersistent()) + return null; + return f; } @@ -1633,6 +1808,9 @@ throw new IOException ("Failure invoking readObject() on " + klass + ": " + x.getClass().getName()); } + + // Invalidate fields which has been read through readFields. + prereadFields = null; } private native Object allocateObject (Class clazz) @@ -1916,6 +2094,7 @@ private boolean fieldsAlreadyRead; private Vector validators; private Hashtable classLookupTable; + private GetField prereadFields; private static boolean dump; Index: java/io/ObjectOutputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v retrieving revision 1.40 diff -u -r1.40 ObjectOutputStream.java --- java/io/ObjectOutputStream.java 2 Dec 2003 18:35:52 -0000 1.40 +++ java/io/ObjectOutputStream.java 28 Dec 2003 17:13:50 -0000 @@ -410,8 +410,8 @@ annotateClass (osc.forClass ()); setBlockDataMode (oldmode); realOutput.writeByte (TC_ENDBLOCKDATA); - - if (osc.isSerializable ()) + + if (osc.isSerializable () || osc.isExternalizable()) writeObject (osc.getSuper ()); else writeObject (null); @@ -989,8 +989,9 @@ ObjectStreamField field = getField (name); if (value != null && - ! field.getType ().isAssignableFrom (value.getClass ())) - throw new IllegalArgumentException (); + ! field.getType ().isAssignableFrom (value.getClass ())) + throw new IllegalArgumentException ("Class " + value.getClass() + + " cannot be cast to " + field.getType()); objs[field.getOffset ()] = value; } Index: java/io/ObjectStreamClass.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamClass.java,v retrieving revision 1.25 diff -u -r1.25 ObjectStreamClass.java --- java/io/ObjectStreamClass.java 2 Dec 2003 18:35:52 -0000 1.25 +++ java/io/ObjectStreamClass.java 28 Dec 2003 17:13:50 -0000 @@ -518,9 +518,12 @@ && Modifier.isPrivate (modifiers)) { fields = getSerialPersistentFields (cl); - Arrays.sort (fields); - calculateOffsets (); - return; + if (fields != null) + { + Arrays.sort (fields); + calculateOffsets (); + return; + } } } catch (NoSuchFieldException ignore) @@ -701,18 +704,41 @@ } } - // Returns the value of CLAZZ's private static final field named - // `serialPersistentFields'. + /** + * Returns the value of CLAZZ's private static final field named + * `serialPersistentFields'. It performs some sanity checks before + * returning the real array. Besides, the returned array is a clean + * copy of the original. So it can be modified. + * + * @param clazz Class to retrieve 'serialPersistentFields' from. + * @return The content of 'serialPersistentFields'. + */ private ObjectStreamField[] getSerialPersistentFields (Class clazz) throws NoSuchFieldException, IllegalAccessException { - ObjectStreamField[] o = null; + ObjectStreamField[] fieldsArray = null; + ObjectStreamField[] o; // Use getDeclaredField rather than getField for the same reason // as above in getDefinedSUID. Field f = clazz.getDeclaredField ("serialPersistentFields"); f.setAccessible(true); - return (ObjectStreamField[])f.get (null); + + int modifiers = f.getModifiers(); + if (!(Modifier.isStatic (modifiers) && + Modifier.isFinal (modifiers) && + Modifier.isPrivate (modifiers))) + return null; + + o = (ObjectStreamField[])f.get (null); + + if (o == null) + return null; + + fieldsArray = new ObjectStreamField[ o.length ]; + System.arraycopy(o, 0, fieldsArray, 0, o.length); + + return fieldsArray; } public static final ObjectStreamField[] NO_FIELDS = {}; --------------070100060007030801080905-- From MAILER-DAEMON Sun Dec 28 14:19:27 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AagRi-000138-Jd for mharc-commit-classpath@gnu.org; Sun, 28 Dec 2003 14:19:26 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AagRd-0000xI-LO for commit-classpath@gnu.org; Sun, 28 Dec 2003 14:19:21 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AagR4-0000Mo-78 for commit-classpath@gnu.org; Sun, 28 Dec 2003 14:19:18 -0500 Received: from [62.4.16.100] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AagR3-0000LK-Ri for commit-classpath@gnu.org; Sun, 28 Dec 2003 14:18:45 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id BD906413D8 for ; Sun, 28 Dec 2003 19:17:16 +0100 (CET) Message-ID: <3FEF1E4B.7000701@kaffe.org> Date: Sun, 28 Dec 2003 19:17:47 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: FYI: Reindented code in serialization. X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 19:19:22 -0000 Hi, I've check in a patch to fix the indentation/code aspect in serialization. I hope it's correct now. The files concerned are java/io/ObjectOutputStream.java, java/io/ObjectInputStream.java, java/io/ObjectStreamClass.java. Guilhem. From MAILER-DAEMON Sun Dec 28 14:32:25 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AageG-0001Af-Tg for mharc-commit-classpath@gnu.org; Sun, 28 Dec 2003 14:32:24 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AageC-00019v-T8 for commit-classpath@gnu.org; Sun, 28 Dec 2003 14:32:20 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aagdg-0000mW-1d for commit-classpath@gnu.org; Sun, 28 Dec 2003 14:32:19 -0500 Received: from [62.4.16.100] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aagde-0000jy-68 for commit-classpath@gnu.org; Sun, 28 Dec 2003 14:31:46 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id D2CC441017 for ; Sun, 28 Dec 2003 19:30:02 +0100 (CET) Message-ID: <3FEF2149.8080506@kaffe.org> Date: Sun, 28 Dec 2003 19:30:33 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org References: <3FEF1E4B.7000701@kaffe.org> In-Reply-To: <3FEF1E4B.7000701@kaffe.org> X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------080803080601090601090201" Subject: Re: FYI: Reindented code in serialization. X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 19:32:21 -0000 This is a multi-part message in MIME format. --------------080803080601090601090201 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Guilhem Lavaux wrote: > Hi, > > I've check in a patch to fix the indentation/code aspect in > serialization. I hope it's correct now. The files concerned are > java/io/ObjectOutputStream.java, java/io/ObjectInputStream.java, > java/io/ObjectStreamClass.java. > > Guilhem. > With the patch attached. --------------080803080601090601090201 Content-Type: text/plain; name="patch_stream" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_stream" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1732 retrieving revision 1.1733 diff -u -r1.1732 -r1.1733 --- ChangeLog 28 Dec 2003 17:18:24 -0000 1.1732 +++ ChangeLog 28 Dec 2003 18:12:43 -0000 1.1733 @@ -1,5 +1,12 @@ 2003-12-28 Guilhem Lavaux + * java/io/ObjectOutputStream.java, + java/io/ObjectInputStream.java, + java/io/ObjectStreamClass.java: Reindented. Some exception message + has been added. + +2003-12-28 Guilhem Lavaux + * java/io/ObjectOutputStream.java (writeClassDescriptor): Externalizable class must also write their hierarchy. Index: java/io/ObjectInputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectInputStream.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- java/io/ObjectInputStream.java 28 Dec 2003 17:18:24 -0000 1.34 +++ java/io/ObjectInputStream.java 28 Dec 2003 18:12:43 -0000 1.35 @@ -73,7 +73,7 @@ * * @see #readStreamHeader() */ - public ObjectInputStream (InputStream in) + public ObjectInputStream(InputStream in) throws IOException, StreamCorruptedException { if (Configuration.DEBUG) @@ -96,13 +96,13 @@ this.blockDataPosition = 0; this.blockDataBytes = 0; this.blockData = new byte[BUFFER_SIZE]; - this.blockDataInput = new DataInputStream (this); - this.realInputStream = new DataInputStream (in); + this.blockDataInput = new DataInputStream(this); + this.realInputStream = new DataInputStream(in); this.nextOID = baseWireHandle; this.objectLookupTable = new Hashtable(); this.validators = new Vector(); this.classLookupTable = new Hashtable(); - setBlockDataMode (true); + setBlockDataMode(true); readStreamHeader(); } @@ -122,10 +122,10 @@ * @exception IOException Exception from underlying * InputStream. */ - public final Object readObject () throws ClassNotFoundException, IOException + public final Object readObject() throws ClassNotFoundException, IOException { if (this.useSubclassMethod) - return readObjectOverride (); + return readObjectOverride(); boolean was_deserializing; @@ -133,12 +133,12 @@ was_deserializing = this.isDeserializing; boolean is_consumed = false; - boolean old_mode = setBlockDataMode (false); + boolean old_mode = setBlockDataMode(false); this.isDeserializing = true; - byte marker = this.realInputStream.readByte (); - dumpElement ("MARKER: 0x" + Integer.toHexString(marker) + " "); + byte marker = this.realInputStream.readByte(); + dumpElement("MARKER: 0x" + Integer.toHexString(marker) + " "); try { @@ -155,43 +155,43 @@ case TC_BLOCKDATALONG: { if (marker == TC_BLOCKDATALONG) - dumpElementln ("BLOCKDATALONG"); + dumpElementln("BLOCKDATALONG"); else - dumpElementln ("BLOCKDATA"); - readNextBlock (marker); - throw new StreamCorruptedException ("Unexpected blockData"); + dumpElementln("BLOCKDATA"); + readNextBlock(marker); + throw new StreamCorruptedException("Unexpected blockData"); } case TC_NULL: { - dumpElementln ("NULL"); + dumpElementln("NULL"); ret_val = null; break; } case TC_REFERENCE: { - dumpElement ("REFERENCE "); - Integer oid = new Integer (this.realInputStream.readInt ()); - dumpElementln (Integer.toHexString(oid.intValue())); + dumpElement("REFERENCE "); + Integer oid = new Integer(this.realInputStream.readInt()); + dumpElementln(Integer.toHexString(oid.intValue())); ret_val = ((ObjectIdentityWrapper) - this.objectLookupTable.get (oid)).object; + this.objectLookupTable.get(oid)).object; break; } case TC_CLASS: { - dumpElementln ("CLASS"); - ObjectStreamClass osc = (ObjectStreamClass)readObject (); - Class clazz = osc.forClass (); - assignNewHandle (clazz); + dumpElementln("CLASS"); + ObjectStreamClass osc = (ObjectStreamClass)readObject(); + Class clazz = osc.forClass(); + assignNewHandle(clazz); ret_val = clazz; break; } case TC_PROXYCLASSDESC: { - dumpElementln ("PROXYCLASS"); + dumpElementln("PROXYCLASS"); int n_intf = this.realInputStream.readInt(); String[] intfs = new String[n_intf]; for (int i = 0; i < n_intf; i++) @@ -200,41 +200,41 @@ System.out.println(intfs[i]); } - boolean oldmode = setBlockDataMode (true); + boolean oldmode = setBlockDataMode(true); Class cl = resolveProxyClass(intfs); setBlockDataMode(oldmode); - ObjectStreamClass osc = lookupClass (cl); - assignNewHandle (osc); + ObjectStreamClass osc = lookupClass(cl); + assignNewHandle(osc); if (!is_consumed) { - byte b = this.realInputStream.readByte (); + byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) - throw new IOException ("Data annotated to class was not consumed." + b); + throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; - ObjectStreamClass superosc = (ObjectStreamClass)readObject (); - osc.setSuperclass (superosc); + ObjectStreamClass superosc = (ObjectStreamClass)readObject(); + osc.setSuperclass(superosc); ret_val = osc; break; } case TC_CLASSDESC: { - ObjectStreamClass osc = readClassDescriptor (); + ObjectStreamClass osc = readClassDescriptor(); if (!is_consumed) { - byte b = this.realInputStream.readByte (); + byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) - throw new IOException ("Data annotated to class was not consumed." + b); + throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; - osc.setSuperclass ((ObjectStreamClass)readObject ()); + osc.setSuperclass ((ObjectStreamClass)readObject()); ret_val = osc; break; } @@ -242,105 +242,107 @@ case TC_STRING: case TC_LONGSTRING: { - dumpElement ("STRING="); - String s = this.realInputStream.readUTF (); - dumpElementln (s); - ret_val = processResolution (s, assignNewHandle (s)); + dumpElement("STRING="); + String s = this.realInputStream.readUTF(); + dumpElementln(s); + ret_val = processResolution(s, assignNewHandle(s)); break; } case TC_ARRAY: { - dumpElementln ("ARRAY"); - ObjectStreamClass osc = (ObjectStreamClass)readObject (); - Class componentType = osc.forClass ().getComponentType (); - dumpElement ("ARRAY LENGTH="); - int length = this.realInputStream.readInt (); + dumpElementln("ARRAY"); + ObjectStreamClass osc = (ObjectStreamClass)readObject(); + Class componentType = osc.forClass().getComponentType(); + dumpElement("ARRAY LENGTH="); + int length = this.realInputStream.readInt(); dumpElementln (length + "; COMPONENT TYPE=" + componentType); - Object array = Array.newInstance (componentType, length); - int handle = assignNewHandle (array); - readArrayElements (array, componentType); - for (int i=0, len=Array.getLength(array); i < len; i++) - dumpElementln (" ELEMENT[" + i + "]=" + Array.get(array, i)); - ret_val = processResolution (array, handle); + Object array = Array.newInstance(componentType, length); + int handle = assignNewHandle(array); + readArrayElements(array, componentType); + for (int i = 0, len = Array.getLength(array); i < len; i++) + dumpElementln(" ELEMENT[" + i + "]=" + Array.get(array, i)); + ret_val = processResolution(array, handle); break; } case TC_OBJECT: { - dumpElementln ("OBJECT"); - ObjectStreamClass osc = (ObjectStreamClass)readObject (); - Class clazz = osc.forClass (); + dumpElementln("OBJECT"); + ObjectStreamClass osc = (ObjectStreamClass)readObject(); + Class clazz = osc.forClass(); - if (!Serializable.class.isAssignableFrom (clazz)) - throw new NotSerializableException (clazz + " is not Serializable, and thus cannot be deserialized."); + if (!Serializable.class.isAssignableFrom(clazz)) + throw new NotSerializableException + (clazz + " is not Serializable, and thus cannot be deserialized."); - if (Externalizable.class.isAssignableFrom (clazz)) + if (Externalizable.class.isAssignableFrom(clazz)) { Externalizable obj = null; try { - obj = (Externalizable)clazz.newInstance (); + obj = (Externalizable)clazz.newInstance(); } catch (InstantiationException e) { - throw new ClassNotFoundException ("Instance of " + clazz - + " could not be created"); + throw new ClassNotFoundException + ("Instance of " + clazz + " could not be created"); } catch (IllegalAccessException e) { - throw new ClassNotFoundException ("Instance of " + clazz - + " could not be created because class or zero-argument constructor is not accessible"); + throw new ClassNotFoundException + ("Instance of " + clazz + " could not be created because class or " + + "zero-argument constructor is not accessible"); } catch (NoSuchMethodError e) { - throw new ClassNotFoundException ("Instance of " + clazz - + " could not be created because zero-argument constructor is not defined"); + throw new ClassNotFoundException + ("Instance of " + clazz + + " could not be created because zero-argument constructor is not defined"); } - int handle = assignNewHandle (obj); + int handle = assignNewHandle(obj); - boolean read_from_blocks = ((osc.getFlags () & SC_BLOCK_DATA) != 0); + boolean read_from_blocks = ((osc.getFlags() & SC_BLOCK_DATA) != 0); boolean oldmode = this.readDataFromBlock; if (read_from_blocks) - setBlockDataMode (true); + setBlockDataMode(true); - obj.readExternal (this); + obj.readExternal(this); if (read_from_blocks) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); - ret_val = processResolution (obj, handle); + ret_val = processResolution(obj, handle); break; } // end if (Externalizable.class.isAssignableFrom (clazz)) // find the first non-serializable, non-abstract // class in clazz's inheritance hierarchy - Class first_nonserial = clazz.getSuperclass (); - while (Serializable.class.isAssignableFrom (first_nonserial) - || Modifier.isAbstract (first_nonserial.getModifiers ())) - first_nonserial = first_nonserial.getSuperclass (); + Class first_nonserial = clazz.getSuperclass(); + while (Serializable.class.isAssignableFrom(first_nonserial) + || Modifier.isAbstract(first_nonserial.getModifiers())) + first_nonserial = first_nonserial.getSuperclass(); Object obj = null; - obj = newObject (clazz, first_nonserial); + obj = newObject(clazz, first_nonserial); if (obj == null) - throw new ClassNotFoundException ("Instance of " + clazz + - " could not be created"); + throw new ClassNotFoundException + ("Instance of " + clazz + " could not be created"); - int handle = assignNewHandle (obj); + int handle = assignNewHandle(obj); this.currentObject = obj; ObjectStreamClass[] hierarchy = - inputGetObjectStreamClasses (clazz); + inputGetObjectStreamClasses(clazz); - for (int i=0; i < hierarchy.length; i++) + for (int i = 0; i < hierarchy.length; i++) { this.currentObjectStreamClass = hierarchy[i]; - dumpElementln ("Reading fields of " - + this.currentObjectStreamClass.getName ()); + dumpElementln("Reading fields of " + this.currentObjectStreamClass.getName ()); // XXX: should initialize fields in classes in the hierarchy // that aren't in the stream @@ -350,68 +352,69 @@ if (this.currentObjectStreamClass.hasReadMethod()) { fieldsAlreadyRead = false; - boolean oldmode = setBlockDataMode (true); - callReadMethod (obj, this.currentObjectStreamClass); - setBlockDataMode (oldmode); - dumpElement ("ENDBLOCKDATA? "); + boolean oldmode = setBlockDataMode(true); + callReadMethod(obj, this.currentObjectStreamClass); + setBlockDataMode(oldmode); + dumpElement("ENDBLOCKDATA? "); try { // FIXME: XXX: This try block is to catch EOF which is // thrown for some objects. That indicates a bug in the logic. - if (this.realInputStream.readByte () != TC_ENDBLOCKDATA) - throw new IOException ("No end of block data seen for class with readObject (ObjectInputStream) method."); - dumpElementln ("yes"); + if (this.realInputStream.readByte() != TC_ENDBLOCKDATA) + throw new IOException + ("No end of block data seen for class with readObject (ObjectInputStream) method."); + dumpElementln("yes"); } catch (EOFException e) { - dumpElementln ("no, got EOFException"); + dumpElementln("no, got EOFException"); } catch (IOException e) { - dumpElementln ("no, got IOException"); + dumpElementln("no, got IOException"); } } else { - readFields (obj, currentObjectStreamClass); + readFields(obj, currentObjectStreamClass); } } this.currentObject = null; this.currentObjectStreamClass = null; - ret_val = processResolution (obj, handle); + ret_val = processResolution(obj, handle); break; } case TC_RESET: - dumpElementln ("RESET"); - clearHandles (); - ret_val = readObject (); + dumpElementln("RESET"); + clearHandles(); + ret_val = readObject(); break; case TC_EXCEPTION: { - dumpElement ("EXCEPTION="); - Exception e = (Exception)readObject (); - dumpElementln (e.toString()); - clearHandles (); - throw new WriteAbortedException ("Exception thrown during writing of stream", e); + dumpElement("EXCEPTION="); + Exception e = (Exception)readObject(); + dumpElementln(e.toString()); + clearHandles(); + throw new WriteAbortedException("Exception thrown during writing of stream", e); } default: - throw new IOException ("Unknown marker on stream: " + marker); + throw new IOException("Unknown marker on stream: " + marker); } } finally { - setBlockDataMode (old_mode); + setBlockDataMode(old_mode); this.isDeserializing = was_deserializing; if (! was_deserializing) { - if (validators.size () > 0) - invokeValidators (); + if (validators.size() > 0) + invokeValidators(); } } @@ -434,30 +437,30 @@ * @throws InvalidClassException If there was a compatibility problem * between the class present in the system and the serialized class. */ - protected ObjectStreamClass readClassDescriptor () + protected ObjectStreamClass readClassDescriptor() throws ClassNotFoundException, IOException { - dumpElement ("CLASSDESC NAME="); - String name = this.realInputStream.readUTF (); - dumpElement (name + "; UID="); + dumpElement("CLASSDESC NAME="); + String name = this.realInputStream.readUTF(); + dumpElement(name + "; UID="); long uid = this.realInputStream.readLong (); - dumpElement (Long.toHexString(uid) + "; FLAGS="); + dumpElement(Long.toHexString(uid) + "; FLAGS="); byte flags = this.realInputStream.readByte (); - dumpElement (Integer.toHexString(flags) + "; FIELD COUNT="); - short field_count = this.realInputStream.readShort (); - dumpElementln (Short.toString(field_count)); + dumpElement(Integer.toHexString(flags) + "; FIELD COUNT="); + short field_count = this.realInputStream.readShort(); + dumpElementln(Short.toString(field_count)); ObjectStreamField[] fields = new ObjectStreamField[field_count]; - ObjectStreamClass osc = new ObjectStreamClass (name, uid, - flags, fields); - assignNewHandle (osc); + ObjectStreamClass osc = new ObjectStreamClass(name, uid, + flags, fields); + assignNewHandle(osc); - for (int i=0; i < field_count; i++) + for (int i = 0; i < field_count; i++) { - dumpElement (" TYPE CODE="); - char type_code = (char)this.realInputStream.readByte (); - dumpElement (type_code + "; FIELD NAME="); - String field_name = this.realInputStream.readUTF (); - dumpElementln (field_name); + dumpElement(" TYPE CODE="); + char type_code = (char)this.realInputStream.readByte(); + dumpElement(type_code + "; FIELD NAME="); + String field_name = this.realInputStream.readUTF(); + dumpElementln(field_name); String class_name; // If the type code is an array or an object we must @@ -465,9 +468,9 @@ // the type code and pass it to ObjectStreamField. // Type codes are decoded by gnu.java.lang.reflect.TypeSignature. if (type_code == 'L' || type_code == '[') - class_name = (String)readObject (); + class_name = (String)readObject(); else - class_name = String.valueOf (type_code); + class_name = String.valueOf(type_code); fields[i] = new ObjectStreamField(field_name, class_name, currentLoader()); @@ -495,11 +498,11 @@ } } - boolean oldmode = setBlockDataMode (true); - osc.setClass (clazz, lookupClass(clazz.getSuperclass())); + boolean oldmode = setBlockDataMode(true); + osc.setClass(clazz, lookupClass(clazz.getSuperclass())); classLookupTable.put(clazz, osc); - setBlockDataMode (oldmode); - + setBlockDataMode(oldmode); + return osc; } @@ -522,7 +525,7 @@ * @exception IOException Exception from underlying * OutputStream. */ - public void defaultReadObject () + public void defaultReadObject() throws ClassNotFoundException, IOException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) @@ -535,7 +538,7 @@ + "defaultReadObject or readFields)"); boolean oldmode = setBlockDataMode(false); - readFields (this.currentObject, this.currentObjectStreamClass); + readFields(this.currentObject, this.currentObjectStreamClass); setBlockDataMode(oldmode); fieldsAlreadyRead = true; @@ -560,20 +563,20 @@ * validator outside of the readObject method of the * object currently being deserialized */ - public void registerValidation (ObjectInputValidation validator, - int priority) + public void registerValidation(ObjectInputValidation validator, + int priority) throws InvalidObjectException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) - throw new NotActiveException ("registerValidation called by non-active " - +"class and/or object"); + throw new NotActiveException("registerValidation called by non-active " + + "class and/or object"); if (validator == null) - throw new InvalidObjectException ("attempt to add a null " - +"ObjectInputValidation object"); + throw new InvalidObjectException("attempt to add a null " + + "ObjectInputValidation object"); - this.validators.addElement (new ValidatorAndPriority (validator, - priority)); + this.validators.addElement(new ValidatorAndPriority (validator, + priority)); } @@ -593,7 +596,7 @@ * * @see java.io.ObjectOutputStream#annotateClass (java.lang.Class) */ - protected Class resolveClass (ObjectStreamClass osc) + protected Class resolveClass(ObjectStreamClass osc) throws ClassNotFoundException, IOException { return Class.forName(osc.getName(), true, currentLoader()); @@ -609,7 +612,7 @@ */ private ClassLoader currentLoader() { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm == null) sm = new SecurityManager () {}; @@ -627,13 +630,13 @@ * @return A valid instance of ObjectStreamClass corresponding * to the specified class. */ - private ObjectStreamClass lookupClass (Class clazz) + private ObjectStreamClass lookupClass(Class clazz) { ObjectStreamClass oclazz; - oclazz = (ObjectStreamClass) classLookupTable.get(clazz); + oclazz = (ObjectStreamClass)classLookupTable.get(clazz); if (oclazz == null) - return ObjectStreamClass.lookup (clazz); + return ObjectStreamClass.lookup(clazz); else return oclazz; } @@ -650,9 +653,9 @@ * @return An array of valid {@link java.io.ObjectStreamClass} instances which * represent the class hierarchy for clazz. */ - private ObjectStreamClass[] inputGetObjectStreamClasses (Class clazz) + private ObjectStreamClass[] inputGetObjectStreamClasses(Class clazz) { - ObjectStreamClass osc = lookupClass (clazz); + ObjectStreamClass osc = lookupClass(clazz); ObjectStreamClass[] ret_val; @@ -691,36 +694,40 @@ * * @see #enableResolveObject(boolean) */ - protected Object resolveObject (Object obj) throws IOException + protected Object resolveObject(Object obj) throws IOException { return obj; } - protected Class resolveProxyClass (String[] intfs) + protected Class resolveProxyClass(String[] intfs) throws IOException, ClassNotFoundException { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm == null) - sm = new SecurityManager () {}; + sm = new SecurityManager() {}; - ClassLoader cl = currentClassLoader (sm); + ClassLoader cl = currentClassLoader(sm); Class[] clss = new Class[intfs.length]; - if(cl == null){ - for (int i = 0; i < intfs.length; i++) - clss[i] = Class.forName(intfs[i]); - cl = ClassLoader.getSystemClassLoader(); - } + if(cl == null) + { + for (int i = 0; i < intfs.length; i++) + clss[i] = Class.forName(intfs[i]); + cl = ClassLoader.getSystemClassLoader(); + } else for (int i = 0; i < intfs.length; i++) clss[i] = cl.loadClass(intfs[i]); - try { - return Proxy.getProxyClass(cl, clss); - } catch (IllegalArgumentException e) { - throw new ClassNotFoundException(null, e); - } + try + { + return Proxy.getProxyClass(cl, clss); + } + catch (IllegalArgumentException e) + { + throw new ClassNotFoundException(null, e); + } } /** @@ -736,9 +743,9 @@ { if (enable) { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm != null) - sm.checkPermission (new SerializablePermission ("enableSubstitution")); + sm.checkPermission(new SerializablePermission("enableSubstitution")); } boolean old_val = this.resolveEnabled; @@ -755,31 +762,31 @@ * @exception StreamCorruptedException An invalid stream magic * number or stream version was read from the stream. */ - protected void readStreamHeader () + protected void readStreamHeader() throws IOException, StreamCorruptedException { - dumpElement ("STREAM MAGIC "); - if (this.realInputStream.readShort () != STREAM_MAGIC) - throw new StreamCorruptedException ("Invalid stream magic number"); + dumpElement("STREAM MAGIC "); + if (this.realInputStream.readShort() != STREAM_MAGIC) + throw new StreamCorruptedException("Invalid stream magic number"); - dumpElementln ("STREAM VERSION "); - if (this.realInputStream.readShort () != STREAM_VERSION) - throw new StreamCorruptedException ("Invalid stream version number"); + dumpElementln("STREAM VERSION "); + if (this.realInputStream.readShort() != STREAM_VERSION) + throw new StreamCorruptedException("Invalid stream version number"); } - public int read () throws IOException + public int read() throws IOException { if (this.readDataFromBlock) { if (this.blockDataPosition >= this.blockDataBytes) - readNextBlock (); + readNextBlock(); return (this.blockData[this.blockDataPosition++] & 0xff); } else - return this.realInputStream.read (); + return this.realInputStream.read(); } - public int read (byte[] data, int offset, int length) throws IOException + public int read(byte[] data, int offset, int length) throws IOException { if (this.readDataFromBlock) { @@ -788,25 +795,25 @@ int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { - System.arraycopy (this.blockData, this.blockDataPosition, - data, offset, remain); + System.arraycopy(this.blockData, this.blockDataPosition, + data, offset, remain); offset += remain; length -= remain; } readNextBlock (); } - System.arraycopy (this.blockData, this.blockDataPosition, - data, offset, length); + System.arraycopy(this.blockData, this.blockDataPosition, + data, offset, length); this.blockDataPosition += length; return length; } else - return this.realInputStream.read (data, offset, length); + return this.realInputStream.read(data, offset, length); } - public int available () throws IOException + public int available() throws IOException { if (this.readDataFromBlock) { @@ -816,15 +823,15 @@ return this.blockDataBytes - this.blockDataPosition; } else - return this.realInputStream.available (); + return this.realInputStream.available(); } - public void close () throws IOException + public void close() throws IOException { - this.realInputStream.close (); + this.realInputStream.close(); } - public boolean readBoolean () throws IOException + public boolean readBoolean() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; @@ -838,160 +845,160 @@ return value; } - public byte readByte () throws IOException + public byte readByte() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - byte value = this.dataInputStream.readByte (); + oldmode = setBlockDataMode(true); + byte value = this.dataInputStream.readByte(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public int readUnsignedByte () throws IOException + public int readUnsignedByte() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - int value = this.dataInputStream.readUnsignedByte (); + oldmode = setBlockDataMode(true); + int value = this.dataInputStream.readUnsignedByte(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public short readShort () throws IOException + public short readShort() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - short value = this.dataInputStream.readShort (); + oldmode = setBlockDataMode(true); + short value = this.dataInputStream.readShort(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public int readUnsignedShort () throws IOException + public int readUnsignedShort() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - int value = this.dataInputStream.readUnsignedShort (); + oldmode = setBlockDataMode(true); + int value = this.dataInputStream.readUnsignedShort(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public char readChar () throws IOException + public char readChar() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - char value = this.dataInputStream.readChar (); + oldmode = setBlockDataMode(true); + char value = this.dataInputStream.readChar(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public int readInt () throws IOException + public int readInt() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - int value = this.dataInputStream.readInt (); + oldmode = setBlockDataMode(true); + int value = this.dataInputStream.readInt(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public long readLong () throws IOException + public long readLong() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - long value = this.dataInputStream.readLong (); + oldmode = setBlockDataMode(true); + long value = this.dataInputStream.readLong(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public float readFloat () throws IOException + public float readFloat() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - float value = this.dataInputStream.readFloat (); + oldmode = setBlockDataMode(true); + float value = this.dataInputStream.readFloat(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public double readDouble () throws IOException + public double readDouble() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - double value = this.dataInputStream.readDouble (); + oldmode = setBlockDataMode(true); + double value = this.dataInputStream.readDouble(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public void readFully (byte data[]) throws IOException + public void readFully(byte data[]) throws IOException { - this.dataInputStream.readFully (data); + this.dataInputStream.readFully(data); } - public void readFully (byte data[], int offset, int size) + public void readFully(byte data[], int offset, int size) throws IOException { - this.dataInputStream.readFully (data, offset, size); + this.dataInputStream.readFully(data, offset, size); } - public int skipBytes (int len) throws IOException + public int skipBytes(int len) throws IOException { - return this.dataInputStream.skipBytes (len); + return this.dataInputStream.skipBytes(len); } /** * @deprecated * @see java.io.DataInputStream#readLine () */ - public String readLine () throws IOException + public String readLine() throws IOException { - return this.dataInputStream.readLine (); + return this.dataInputStream.readLine(); } - public String readUTF () throws IOException + public String readUTF() throws IOException { - return this.dataInputStream.readUTF (); + return this.dataInputStream.readUTF(); } /** @@ -1002,36 +1009,36 @@ */ public static abstract class GetField { - public abstract ObjectStreamClass getObjectStreamClass (); + public abstract ObjectStreamClass getObjectStreamClass(); - public abstract boolean defaulted (String name) + public abstract boolean defaulted(String name) throws IOException, IllegalArgumentException; - public abstract boolean get (String name, boolean defvalue) + public abstract boolean get(String name, boolean defvalue) throws IOException, IllegalArgumentException; - public abstract char get (String name, char defvalue) + public abstract char get(String name, char defvalue) throws IOException, IllegalArgumentException; - public abstract byte get (String name, byte defvalue) + public abstract byte get(String name, byte defvalue) throws IOException, IllegalArgumentException; - public abstract short get (String name, short defvalue) + public abstract short get(String name, short defvalue) throws IOException, IllegalArgumentException; - public abstract int get (String name, int defvalue) + public abstract int get(String name, int defvalue) throws IOException, IllegalArgumentException; - public abstract long get (String name, long defvalue) + public abstract long get(String name, long defvalue) throws IOException, IllegalArgumentException; - public abstract float get (String name, float defvalue) + public abstract float get(String name, float defvalue) throws IOException, IllegalArgumentException; - public abstract double get (String name, double defvalue) + public abstract double get(String name, double defvalue) throws IOException, IllegalArgumentException; - public abstract Object get (String name, Object defvalue) + public abstract Object get(String name, Object defvalue) throws IOException, IllegalArgumentException; } @@ -1048,18 +1055,18 @@ * @throws ClassNotFoundException * @throws NotActiveException */ - public GetField readFields () + public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) - throw new NotActiveException ("readFields called by non-active class and/or object"); + throw new NotActiveException("readFields called by non-active class and/or object"); if (prereadFields != null) return prereadFields; if (fieldsAlreadyRead) - throw new NotActiveException ("readFields called but fields already read from" - + " stream (by defaultReadObject or readFields)"); + throw new NotActiveException("readFields called but fields already read from" + + " stream (by defaultReadObject or readFields)"); final ObjectStreamClass clazz = this.currentObjectStreamClass; final byte[] prim_field_data = new byte[clazz.primFieldSize]; @@ -1068,20 +1075,20 @@ // Apparently Block data is not used with GetField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. - boolean oldmode = setBlockDataMode (false); - readFully (prim_field_data); + boolean oldmode = setBlockDataMode(false); + readFully(prim_field_data); for (int i = 0; i < objs.length; ++ i) - objs[i] = readObject (); - setBlockDataMode (oldmode); + objs[i] = readObject(); + setBlockDataMode(oldmode); prereadFields = new GetField() { - public ObjectStreamClass getObjectStreamClass () + public ObjectStreamClass getObjectStreamClass() { return clazz; } - public boolean defaulted (String name) + public boolean defaulted(String name) throws IOException, IllegalArgumentException { ObjectStreamField f = clazz.getField(name); @@ -1107,69 +1114,69 @@ } catch (NoSuchFieldException e) { - throw new IllegalArgumentException (e.getMessage()); + throw new IllegalArgumentException(e.getMessage()); } } - public boolean get (String name, boolean defvalue) + public boolean get(String name, boolean defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Boolean.TYPE); + ObjectStreamField field = getField(name, Boolean.TYPE); if (field == null) return defvalue; - return prim_field_data[field.getOffset ()] == 0 ? false : true; + return prim_field_data[field.getOffset()] == 0 ? false : true; } - public char get (String name, char defvalue) + public char get(String name, char defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Character.TYPE); + ObjectStreamField field = getField(name, Character.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return (char)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } - public byte get (String name, byte defvalue) + public byte get(String name, byte defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Byte.TYPE); + ObjectStreamField field = getField(name, Byte.TYPE); if (field == null) return defvalue; - return prim_field_data[field.getOffset ()]; + return prim_field_data[field.getOffset()]; } - public short get (String name, short defvalue) + public short get(String name, short defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Short.TYPE); + ObjectStreamField field = getField(name, Short.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return (short)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } - public int get (String name, int defvalue) + public int get(String name, int defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Integer.TYPE); + ObjectStreamField field = getField(name, Integer.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return ((prim_field_data[off++] & 0xFF) << 24) | ((prim_field_data[off++] & 0xFF) << 16) @@ -1177,15 +1184,15 @@ | (prim_field_data[off] & 0xFF); } - public long get (String name, long defvalue) + public long get(String name, long defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Long.TYPE); + ObjectStreamField field = getField(name, Long.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return (long)(((prim_field_data[off++] & 0xFF) << 56) | ((prim_field_data[off++] & 0xFF) << 48) @@ -1197,31 +1204,31 @@ | (prim_field_data[off] & 0xFF)); } - public float get (String name, float defvalue) + public float get(String name, float defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Float.TYPE); + ObjectStreamField field = getField(name, Float.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); - return Float.intBitsToFloat (((prim_field_data[off++] & 0xFF) << 24) - | ((prim_field_data[off++] & 0xFF) << 16) - | ((prim_field_data[off++] & 0xFF) << 8) - | (prim_field_data[off] & 0xFF)); + return Float.intBitsToFloat(((prim_field_data[off++] & 0xFF) << 24) + | ((prim_field_data[off++] & 0xFF) << 16) + | ((prim_field_data[off++] & 0xFF) << 8) + | (prim_field_data[off] & 0xFF)); } - public double get (String name, double defvalue) + public double get(String name, double defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Double.TYPE); + ObjectStreamField field = getField(name, Double.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return Double.longBitsToDouble ( (long) (((prim_field_data[off++] & 0xFF) << 56) @@ -1234,22 +1241,22 @@ | (prim_field_data[off] & 0xFF))); } - public Object get (String name, Object defvalue) + public Object get(String name, Object defvalue) throws IOException, IllegalArgumentException { ObjectStreamField field = - getField (name, defvalue == null ? null : defvalue.getClass ()); + getField(name, defvalue == null ? null : defvalue.getClass ()); if (field == null) return defvalue; - return objs[field.getOffset ()]; + return objs[field.getOffset()]; } - private ObjectStreamField getField (String name, Class type) + private ObjectStreamField getField(String name, Class type) throws IllegalArgumentException { - ObjectStreamField field = clazz.getField (name); + ObjectStreamField field = clazz.getField(name); boolean illegal = false; try @@ -1300,7 +1307,7 @@ */ try { - Field f = clazz.forClass().getDeclaredField (name); + Field f = clazz.forClass().getDeclaredField(name); if (Modifier.isTransient(f.getModifiers())) throw new IllegalArgumentException ("no such field (non transient) " + name); @@ -1333,12 +1340,12 @@ * * @see #readObjectOverride() */ - protected ObjectInputStream () + protected ObjectInputStream() throws IOException, SecurityException { - SecurityManager sec_man = System.getSecurityManager (); + SecurityManager sec_man = System.getSecurityManager(); if (sec_man != null) - sec_man.checkPermission (SUBCLASS_IMPLEMENTATION_PERMISSION); + sec_man.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION); this.useSubclassMethod = true; } @@ -1351,10 +1358,10 @@ * * @see #ObjectInputStream() */ - protected Object readObjectOverride () + protected Object readObjectOverride() throws ClassNotFoundException, IOException, OptionalDataException { - throw new IOException ("Subclass of ObjectInputStream must implement readObjectOverride"); + throw new IOException("Subclass of ObjectInputStream must implement readObjectOverride"); } /** @@ -1363,14 +1370,14 @@ * @param obj The object for which we want a new handle. * @return A valid handle for the specified object. */ - private int assignNewHandle (Object obj) + private int assignNewHandle(Object obj) { - this.objectLookupTable.put (new Integer (this.nextOID), - new ObjectIdentityWrapper (obj)); + this.objectLookupTable.put(new Integer(this.nextOID), + new ObjectIdentityWrapper(obj)); return this.nextOID++; } - private Object processResolution (Object obj, int handle) + private Object processResolution(Object obj, int handle) throws IOException { if (obj instanceof Serializable) @@ -1380,7 +1387,7 @@ { Class classArgs[] = {}; m = getMethod(obj.getClass(), "readResolve", classArgs); - obj = m.invoke (obj, new Object[] {}); + obj = m.invoke(obj, new Object[] {}); } catch (NoSuchMethodException ignore) { @@ -1394,42 +1401,42 @@ } if (this.resolveEnabled) - obj = resolveObject (obj); + obj = resolveObject(obj); - this.objectLookupTable.put (new Integer (handle), - new ObjectIdentityWrapper (obj)); + this.objectLookupTable.put(new Integer(handle), + new ObjectIdentityWrapper(obj)); return obj; } - private void clearHandles () + private void clearHandles() { - this.objectLookupTable.clear (); + this.objectLookupTable.clear(); this.nextOID = baseWireHandle; } - private void readNextBlock () throws IOException + private void readNextBlock() throws IOException { - readNextBlock (this.realInputStream.readByte ()); + readNextBlock(this.realInputStream.readByte()); } - private void readNextBlock (byte marker) throws IOException + private void readNextBlock(byte marker) throws IOException { if (marker == TC_BLOCKDATA) { - dumpElement ("BLOCK DATA SIZE="); - this.blockDataBytes = this.realInputStream.readUnsignedByte (); + dumpElement("BLOCK DATA SIZE="); + this.blockDataBytes = this.realInputStream.readUnsignedByte(); dumpElementln (Integer.toString(this.blockDataBytes)); } else if (marker == TC_BLOCKDATALONG) { - dumpElement ("BLOCK DATA LONG SIZE="); - this.blockDataBytes = this.realInputStream.readInt (); + dumpElement("BLOCK DATA LONG SIZE="); + this.blockDataBytes = this.realInputStream.readInt(); dumpElementln (Integer.toString(this.blockDataBytes)); } else { - throw new EOFException ("Attempt to read primitive data, but no data block is active."); + throw new EOFException("Attempt to read primitive data, but no data block is active."); } if (this.blockData.length < this.blockDataBytes) @@ -1442,62 +1449,62 @@ private void readArrayElements (Object array, Class clazz) throws ClassNotFoundException, IOException { - if (clazz.isPrimitive ()) + if (clazz.isPrimitive()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readBoolean (); + cast_array[i] = this.realInputStream.readBoolean(); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readByte (); + cast_array[i] = this.realInputStream.readByte(); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readChar (); + cast_array[i] = this.realInputStream.readChar(); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readDouble (); + cast_array[i] = this.realInputStream.readDouble(); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readFloat (); + cast_array[i] = this.realInputStream.readFloat(); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readInt (); + cast_array[i] = this.realInputStream.readInt(); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readLong (); + cast_array[i] = this.realInputStream.readLong(); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readShort (); + cast_array[i] = this.realInputStream.readShort(); return; } } @@ -1505,7 +1512,7 @@ { Object[] cast_array = (Object[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = readObject (); + cast_array[i] = readObject(); } } @@ -1535,7 +1542,7 @@ else { stream_field = stream_fields[stream_idx]; - type = stream_field.getType (); + type = stream_field.getType(); } if (real_idx == real_fields.length) @@ -1543,8 +1550,8 @@ else { real_field = real_fields[real_idx]; - type = real_field.getType (); - field_name = real_field.getName (); + type = real_field.getType(); + field_name = real_field.getName(); } if (set_value && !default_initialize) @@ -1583,82 +1590,82 @@ if (type == Boolean.TYPE) { boolean value = - default_initialize ? false : this.realInputStream.readBoolean (); + default_initialize ? false : this.realInputStream.readBoolean(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setBooleanField (obj, stream_osc.forClass (), field_name, value); + setBooleanField(obj, stream_osc.forClass(), field_name, value); } else if (type == Byte.TYPE) { byte value = - default_initialize ? 0 : this.realInputStream.readByte (); + default_initialize ? 0 : this.realInputStream.readByte(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setByteField (obj, stream_osc.forClass (), field_name, value); + setByteField(obj, stream_osc.forClass(), field_name, value); } else if (type == Character.TYPE) { char value = - default_initialize ? (char)0 : this.realInputStream.readChar (); + default_initialize ? (char)0 : this.realInputStream.readChar(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setCharField (obj, stream_osc.forClass (), field_name, value); + setCharField(obj, stream_osc.forClass(), field_name, value); } else if (type == Double.TYPE) { double value = - default_initialize ? 0 : this.realInputStream.readDouble (); + default_initialize ? 0 : this.realInputStream.readDouble(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setDoubleField (obj, stream_osc.forClass (), field_name, value); + setDoubleField(obj, stream_osc.forClass(), field_name, value); } else if (type == Float.TYPE) { float value = - default_initialize ? 0 : this.realInputStream.readFloat (); + default_initialize ? 0 : this.realInputStream.readFloat(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setFloatField (obj, stream_osc.forClass (), field_name, value); + setFloatField(obj, stream_osc.forClass(), field_name, value); } else if (type == Integer.TYPE) { int value = - default_initialize ? 0 : this.realInputStream.readInt (); + default_initialize ? 0 : this.realInputStream.readInt(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setIntField (obj, stream_osc.forClass (), field_name, value); + setIntField(obj, stream_osc.forClass(), field_name, value); } else if (type == Long.TYPE) { long value = - default_initialize ? 0 : this.realInputStream.readLong (); + default_initialize ? 0 : this.realInputStream.readLong(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setLongField (obj, stream_osc.forClass (), field_name, value); + setLongField(obj, stream_osc.forClass(), field_name, value); } else if (type == Short.TYPE) { short value = - default_initialize ? (short)0 : this.realInputStream.readShort (); + default_initialize ? (short)0 : this.realInputStream.readShort(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setShortField (obj, stream_osc.forClass (), field_name, value); + setShortField(obj, stream_osc.forClass(), field_name, value); } else { Object value = - default_initialize ? null : readObject (); + default_initialize ? null : readObject(); if (set_value) - setObjectField (obj, stream_osc.forClass (), field_name, - real_field.getTypeString (), value); + setObjectField(obj, stream_osc.forClass(), field_name, + real_field.getTypeString(), value); } } catch (NoSuchFieldError e) @@ -1699,20 +1706,20 @@ // runs all registered ObjectInputValidations in prioritized order // on OBJ - private void invokeValidators () throws InvalidObjectException + private void invokeValidators() throws InvalidObjectException { - Object[] validators = new Object[this.validators.size ()]; + Object[] validators = new Object[this.validators.size()]; this.validators.copyInto (validators); Arrays.sort (validators); try { for (int i=0; i < validators.length; i++) - ((ObjectInputValidation)validators[i]).validateObject (); + ((ObjectInputValidation)validators[i]).validateObject(); } finally { - this.validators.removeAllElements (); + this.validators.removeAllElements(); } } @@ -1785,7 +1792,7 @@ Class classArgs[] = {ObjectInputStream.class}; Method m = getMethod (klass, "readObject", classArgs); Object args[] = {this}; - m.invoke (obj, args); + m.invoke(obj, args); } catch (NoSuchMethodException nsme) { @@ -1800,12 +1807,12 @@ if (exception instanceof IOException) throw (IOException) exception; - throw new IOException ("Exception thrown from readObject() on " + + throw new IOException("Exception thrown from readObject() on " + klass + ": " + exception.getClass().getName()); } catch (Exception x) { - throw new IOException ("Failure invoking readObject() on " + + throw new IOException("Failure invoking readObject() on " + klass + ": " + x.getClass().getName()); } @@ -1829,13 +1836,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setBooleanField (Object obj, Class klass, String field_name, + private void setBooleanField(Object obj, Class klass, String field_name, boolean val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setBoolean (obj, val); + Field f = getField(klass, field_name); + f.setBoolean(obj, val); } catch (IllegalArgumentException _) { @@ -1857,13 +1864,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setByteField (Object obj, Class klass, String field_name, + private void setByteField(Object obj, Class klass, String field_name, byte val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setByte (obj, val); + Field f = getField(klass, field_name); + f.setByte(obj, val); } catch (IllegalArgumentException _) { @@ -1885,13 +1892,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setCharField (Object obj, Class klass, String field_name, + private void setCharField(Object obj, Class klass, String field_name, char val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setChar (obj, val); + Field f = getField(klass, field_name); + f.setChar(obj, val); } catch (IllegalArgumentException _) { @@ -1913,13 +1920,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setDoubleField (Object obj, Class klass, String field_name, + private void setDoubleField(Object obj, Class klass, String field_name, double val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setDouble (obj, val); + Field f = getField(klass, field_name); + f.setDouble(obj, val); } catch (IllegalArgumentException _) { @@ -1941,13 +1948,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setFloatField (Object obj, Class klass, String field_name, + private void setFloatField(Object obj, Class klass, String field_name, float val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setFloat (obj, val); + Field f = getField(klass, field_name); + f.setFloat(obj, val); } catch (IllegalArgumentException _) { @@ -1969,13 +1976,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setIntField (Object obj, Class klass, String field_name, + private void setIntField(Object obj, Class klass, String field_name, int val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setInt (obj, val); + Field f = getField(klass, field_name); + f.setInt(obj, val); } catch (IllegalArgumentException _) { @@ -1997,13 +2004,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setLongField (Object obj, Class klass, String field_name, + private void setLongField(Object obj, Class klass, String field_name, long val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setLong (obj, val); + Field f = getField(klass, field_name); + f.setLong(obj, val); } catch (IllegalArgumentException _) { @@ -2025,13 +2032,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setShortField (Object obj, Class klass, String field_name, + private void setShortField(Object obj, Class klass, String field_name, short val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setShort (obj, val); + Field f = getField(klass, field_name); + f.setShort(obj, val); } catch (IllegalArgumentException _) { @@ -2053,25 +2060,26 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setObjectField (Object obj, Class klass, String field_name, + private void setObjectField(Object obj, Class klass, String field_name, String type_code, Object val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); + Field f = getField(klass, field_name); ObjectStreamField of = new ObjectStreamField(field_name, f.getType()); if (of.getTypeString() == null || !of.getTypeString().equals(type_code)) throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); - f.set (obj, val); + f.set(obj, val); } catch (InvalidClassException e) { throw e; } catch (Exception _) - {} + { + } } private static final int BUFFER_SIZE = 1024; Index: java/io/ObjectOutputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- java/io/ObjectOutputStream.java 28 Dec 2003 17:18:24 -0000 1.41 +++ java/io/ObjectOutputStream.java 28 Dec 2003 18:12:43 -0000 1.42 @@ -132,18 +132,18 @@ */ public ObjectOutputStream (OutputStream out) throws IOException { - realOutput = new DataOutputStream (out); + realOutput = new DataOutputStream(out); blockData = new byte[ BUFFER_SIZE ]; blockDataCount = 0; - blockDataOutput = new DataOutputStream (this); - setBlockDataMode (true); + blockDataOutput = new DataOutputStream(this); + setBlockDataMode(true); replacementEnabled = false; isSerializing = false; nextOID = baseWireHandle; - OIDLookupTable = new Hashtable (); + OIDLookupTable = new Hashtable(); protocolVersion = defaultProtocolVersion; useSubclassMethod = false; - writeStreamHeader (); + writeStreamHeader(); } /** @@ -168,16 +168,16 @@ * @exception IOException Exception from underlying * OutputStream. */ - public final void writeObject (Object obj) throws IOException + public final void writeObject(Object obj) throws IOException { if (useSubclassMethod) { - writeObjectOverride (obj); + writeObjectOverride(obj); return; } boolean was_serializing = isSerializing; - boolean old_mode = setBlockDataMode (false); + boolean old_mode = setBlockDataMode(false); try { isSerializing = true; @@ -188,49 +188,49 @@ { if (obj == null) { - realOutput.writeByte (TC_NULL); + realOutput.writeByte(TC_NULL); break; } - Integer handle = findHandle (obj); + Integer handle = findHandle(obj); if (handle != null) { - realOutput.writeByte (TC_REFERENCE); - realOutput.writeInt (handle.intValue ()); + realOutput.writeByte(TC_REFERENCE); + realOutput.writeInt(handle.intValue()); break; } if (obj instanceof Class) { Class cl = (Class)obj; - ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject (cl); - assignNewHandle (obj); - realOutput.writeByte (TC_CLASS); + ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject(cl); + assignNewHandle(obj); + realOutput.writeByte(TC_CLASS); if (!osc.isProxyClass) { writeObject (osc); } else { - realOutput.writeByte (TC_PROXYCLASSDESC); + realOutput.writeByte(TC_PROXYCLASSDESC); Class[] intfs = cl.getInterfaces(); realOutput.writeInt(intfs.length); for (int i = 0; i < intfs.length; i++) realOutput.writeUTF(intfs[i].getName()); - boolean oldmode = setBlockDataMode (true); + boolean oldmode = setBlockDataMode(true); annotateProxyClass(cl); - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); realOutput.writeByte(TC_ENDBLOCKDATA); - writeObject (osc.getSuper()); + writeObject(osc.getSuper()); } break; } if (obj instanceof ObjectStreamClass) { - writeClassDescriptor ((ObjectStreamClass) obj); + writeClassDescriptor((ObjectStreamClass) obj); break; } @@ -238,7 +238,7 @@ && ! replaceDone) { replacedObject = obj; - + if (obj instanceof Serializable) { Method m = null; @@ -250,7 +250,7 @@ // m can't be null by definition since an // exception would have been thrown so a check // for null is not needed. - obj = m.invoke (obj, new Object[] {}); + obj = m.invoke(obj, new Object[] {}); } catch (NoSuchMethodException ignore) { @@ -262,55 +262,55 @@ { } } - + if (replacementEnabled) - obj = replaceObject (obj); - + obj = replaceObject(obj); + replaceDone = true; continue; } if (obj instanceof String) { - realOutput.writeByte (TC_STRING); - assignNewHandle (obj); - realOutput.writeUTF ((String)obj); + realOutput.writeByte(TC_STRING); + assignNewHandle(obj); + realOutput.writeUTF((String)obj); break; } - Class clazz = obj.getClass (); - ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject (clazz); + Class clazz = obj.getClass(); + ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject(clazz); if (osc == null) - throw new NotSerializableException (clazz.getName ()); + throw new NotSerializableException(clazz.getName()); if (clazz.isArray ()) { - realOutput.writeByte (TC_ARRAY); - writeObject (osc); - assignNewHandle (obj); - writeArraySizeAndElements (obj, clazz.getComponentType ()); + realOutput.writeByte(TC_ARRAY); + writeObject(osc); + assignNewHandle(obj); + writeArraySizeAndElements(obj, clazz.getComponentType()); break; } - - realOutput.writeByte (TC_OBJECT); - writeObject (osc); + + realOutput.writeByte(TC_OBJECT); + writeObject(osc); if (replaceDone) - assignNewHandle (replacedObject); + assignNewHandle(replacedObject); else - assignNewHandle (obj); + assignNewHandle(obj); if (obj instanceof Externalizable) { if (protocolVersion == PROTOCOL_VERSION_2) - setBlockDataMode (true); + setBlockDataMode(true); - ((Externalizable)obj).writeExternal (this); + ((Externalizable)obj).writeExternal(this); if (protocolVersion == PROTOCOL_VERSION_2) { - setBlockDataMode (false); - realOutput.writeByte (TC_ENDBLOCKDATA); + setBlockDataMode(false); + realOutput.writeByte(TC_ENDBLOCKDATA); } break; @@ -320,22 +320,22 @@ { currentObject = obj; ObjectStreamClass[] hierarchy = - ObjectStreamClass.getObjectStreamClasses (clazz); + ObjectStreamClass.getObjectStreamClasses(clazz); - for (int i=0; i < hierarchy.length; i++) + for (int i = 0; i < hierarchy.length; i++) { currentObjectStreamClass = hierarchy[i]; fieldsAlreadyWritten = false; - if (currentObjectStreamClass.hasWriteMethod ()) + if (currentObjectStreamClass.hasWriteMethod()) { - setBlockDataMode (true); - callWriteMethod (obj, currentObjectStreamClass); - setBlockDataMode (false); - realOutput.writeByte (TC_ENDBLOCKDATA); + setBlockDataMode(true); + callWriteMethod(obj, currentObjectStreamClass); + setBlockDataMode(false); + realOutput.writeByte(TC_ENDBLOCKDATA); } else - writeFields (obj, currentObjectStreamClass); + writeFields(obj, currentObjectStreamClass); } currentObject = null; @@ -344,7 +344,7 @@ break; } - throw new NotSerializableException (clazz.getName ()); + throw new NotSerializableException(clazz.getName ()); } // end pseudo-loop } catch (ObjectStreamException ose) @@ -354,17 +354,18 @@ } catch (IOException e) { - realOutput.writeByte (TC_EXCEPTION); - reset (true); + realOutput.writeByte(TC_EXCEPTION); + reset(true); - setBlockDataMode (false); + setBlockDataMode(false); try { - writeObject (e); + writeObject(e); } catch (IOException ioe) { - throw new StreamCorruptedException ("Exception " + ioe + " thrown while exception was being written to stream."); + throw new StreamCorruptedException + ("Exception " + ioe + " thrown while exception was being written to stream."); } reset (true); @@ -373,224 +374,227 @@ finally { isSerializing = was_serializing; - setBlockDataMode (old_mode); + setBlockDataMode(old_mode); } } - protected void writeClassDescriptor (ObjectStreamClass osc) throws IOException + protected void writeClassDescriptor(ObjectStreamClass osc) throws IOException { - realOutput.writeByte (TC_CLASSDESC); - realOutput.writeUTF (osc.getName ()); - realOutput.writeLong (osc.getSerialVersionUID ()); - assignNewHandle (osc); + realOutput.writeByte(TC_CLASSDESC); + realOutput.writeUTF(osc.getName()); + realOutput.writeLong(osc.getSerialVersionUID()); + assignNewHandle(osc); - int flags = osc.getFlags (); + int flags = osc.getFlags(); if (protocolVersion == PROTOCOL_VERSION_2 - && osc.isExternalizable ()) + && osc.isExternalizable()) flags |= SC_BLOCK_DATA; - realOutput.writeByte (flags); + realOutput.writeByte(flags); ObjectStreamField[] fields = osc.fields; - realOutput.writeShort (fields.length); + realOutput.writeShort(fields.length); ObjectStreamField field; - for (int i=0; i < fields.length; i++) + for (int i = 0; i < fields.length; i++) { field = fields[i]; - realOutput.writeByte (field.getTypeCode ()); - realOutput.writeUTF (field.getName ()); + realOutput.writeByte(field.getTypeCode ()); + realOutput.writeUTF(field.getName ()); - if (! field.isPrimitive ()) - writeObject (field.getTypeString ()); + if (! field.isPrimitive()) + writeObject(field.getTypeString()); } - boolean oldmode = setBlockDataMode (true); - annotateClass (osc.forClass ()); - setBlockDataMode (oldmode); - realOutput.writeByte (TC_ENDBLOCKDATA); + boolean oldmode = setBlockDataMode(true); + annotateClass(osc.forClass()); + setBlockDataMode(oldmode); + realOutput.writeByte(TC_ENDBLOCKDATA); - if (osc.isSerializable () || osc.isExternalizable()) - writeObject (osc.getSuper ()); + if (osc.isSerializable() || osc.isExternalizable()) + writeObject(osc.getSuper()); else - writeObject (null); + writeObject(null); } /** - Writes the current objects non-transient, non-static fields from - the current class to the underlying output stream. - - This method is intended to be called from within a object's - private void writeObject (ObjectOutputStream) - method. - - @exception NotActiveException This method was called from a - context other than from the current object's and current class's - private void writeObject (ObjectOutputStream) - method. - - @exception IOException Exception from underlying - OutputStream. - */ - public void defaultWriteObject () + * Writes the current objects non-transient, non-static fields from + * the current class to the underlying output stream. + * + * This method is intended to be called from within a object's + * private void writeObject (ObjectOutputStream) + * method. + * + * @exception NotActiveException This method was called from a + * context other than from the current object's and current class's + * private void writeObject (ObjectOutputStream) + * method. + * + * @exception IOException Exception from underlying + * OutputStream. + */ + public void defaultWriteObject() throws IOException, NotActiveException { - markFieldsWritten (); - writeFields (currentObject, currentObjectStreamClass); + markFieldsWritten(); + writeFields(currentObject, currentObjectStreamClass); } - private void markFieldsWritten () throws IOException + private void markFieldsWritten() throws IOException { if (currentObject == null || currentObjectStreamClass == null) - throw new NotActiveException ("defaultWriteObject called by non-active class and/or object"); + throw new NotActiveException + ("defaultWriteObject called by non-active class and/or object"); if (fieldsAlreadyWritten) - throw new IOException ("Only one of putFields and defaultWriteObject may be called, and it may only be called once"); + throw new IOException + ("Only one of putFields and defaultWriteObject may be called, and it may only be called once"); fieldsAlreadyWritten = true; } - /** - Resets stream to state equivalent to the state just after it was - constructed. - - Causes all objects previously written to the stream to be - forgotten. A notification of this reset is also written to the - underlying stream. - - @exception IOException Exception from underlying - OutputStream or reset called while serialization is - in progress. - */ - public void reset () throws IOException + * Resets stream to state equivalent to the state just after it was + * constructed. + * + * Causes all objects previously written to the stream to be + * forgotten. A notification of this reset is also written to the + * underlying stream. + * + * @exception IOException Exception from underlying + * OutputStream or reset called while serialization is + * in progress. + */ + public void reset() throws IOException { - reset (false); + reset(false); } - private void reset (boolean internal) throws IOException + private void reset(boolean internal) throws IOException { if (!internal) { if (isSerializing) - throw new IOException ("Reset called while serialization in progress"); + throw new IOException("Reset called while serialization in progress"); - realOutput.writeByte (TC_RESET); + realOutput.writeByte(TC_RESET); } - - clearHandles (); + + clearHandles(); } /** - Informs this ObjectOutputStream to write data - according to the specified protocol. There are currently two - different protocols, specified by PROTOCOL_VERSION_1 - and PROTOCOL_VERSION_2. This implementation writes - data using PROTOCOL_VERSION_2 by default, as is done - by the JDK 1.2. - - A non-portable method, setDefaultProtocolVersion (int - version) is provided to change the default protocol - version. - - For an explination of the differences beween the two protocols - see XXX: the Java ObjectSerialization Specification. - - @exception IOException if version is not a valid - protocol - - @see #setDefaultProtocolVersion(int) - */ - public void useProtocolVersion (int version) throws IOException + * Informs this ObjectOutputStream to write data + * according to the specified protocol. There are currently two + * different protocols, specified by PROTOCOL_VERSION_1 + * and PROTOCOL_VERSION_2. This implementation writes + * data using PROTOCOL_VERSION_2 by default, as is done + * by the JDK 1.2. + * + * A non-portable method, setDefaultProtocolVersion (int + * version) is provided to change the default protocol + * version. + * + * For an explination of the differences beween the two protocols + * see XXX: the Java ObjectSerialization Specification. + * + * @exception IOException if version is not a valid + * protocol + * + * @see #setDefaultProtocolVersion(int) + */ + public void useProtocolVersion(int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) - throw new IOException ("Invalid protocol version requested."); + throw new IOException("Invalid protocol version requested."); protocolVersion = version; } /** - GNU $classpath specific - - Changes the default stream protocol used by all - ObjectOutputStreams. There are currently two - different protocols, specified by PROTOCOL_VERSION_1 - and PROTOCOL_VERSION_2. The default default is - PROTOCOL_VERSION_1. - - @exception IOException if version is not a valid - protocol - - @see #useProtocolVersion(int) - */ - public static void setDefaultProtocolVersion (int version) + * GNU $classpath specific + * + * Changes the default stream protocol used by all + * ObjectOutputStreams. There are currently two + * different protocols, specified by PROTOCOL_VERSION_1 + * and PROTOCOL_VERSION_2. The default default is + * PROTOCOL_VERSION_1. + * + * @exception IOException if version is not a valid + * protocol + * + * @see #useProtocolVersion(int) + */ + public static void setDefaultProtocolVersion(int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) - throw new IOException ("Invalid protocol version requested."); + throw new IOException("Invalid protocol version requested."); defaultProtocolVersion = version; } /** - An empty hook that allows subclasses to write extra information - about classes to the stream. This method is called the first - time each class is seen, and after all of the standard - information about the class has been written. - - @exception IOException Exception from underlying - OutputStream. - - @see ObjectInputStream#resolveClass(java.io.ObjectStreamClass) - */ - protected void annotateClass (Class cl) throws IOException - {} + * An empty hook that allows subclasses to write extra information + * about classes to the stream. This method is called the first + * time each class is seen, and after all of the standard + * information about the class has been written. + * + * @exception IOException Exception from underlying + * OutputStream. + * + * @see ObjectInputStream#resolveClass(java.io.ObjectStreamClass) + */ + protected void annotateClass(Class cl) throws IOException + { + } protected void annotateProxyClass(Class cl) throws IOException - {} + { + } /** - Allows subclasses to replace objects that are written to the - stream with other objects to be written in their place. This - method is called the first time each object is encountered - (modulo reseting of the stream). - - This method must be enabled before it will be called in the - serialization process. - - @exception IOException Exception from underlying - OutputStream. - - @see #enableReplaceObject(boolean) - */ - protected Object replaceObject (Object obj) throws IOException + * Allows subclasses to replace objects that are written to the + * stream with other objects to be written in their place. This + * method is called the first time each object is encountered + * (modulo reseting of the stream). + * + * This method must be enabled before it will be called in the + * serialization process. + * + * @exception IOException Exception from underlying + * OutputStream. + * + * @see #enableReplaceObject(boolean) + */ + protected Object replaceObject(Object obj) throws IOException { return obj; } /** - If enable is true and this object is - trusted, then replaceObject (Object) will be called - in subsequent calls to writeObject (Object). - Otherwise, replaceObject (Object) will not be called. - - @exception SecurityException This class is not trusted. - */ - protected boolean enableReplaceObject (boolean enable) + * If enable is true and this object is + * trusted, then replaceObject (Object) will be called + * in subsequent calls to writeObject (Object). + * Otherwise, replaceObject (Object) will not be called. + * + * @exception SecurityException This class is not trusted. + */ + protected boolean enableReplaceObject(boolean enable) throws SecurityException { if (enable) { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm != null) - sm.checkPermission (new SerializablePermission ("enableSubstitution")); + sm.checkPermission(new SerializablePermission("enableSubstitution")); } boolean old_val = replacementEnabled; @@ -600,20 +604,18 @@ /** - Writes stream magic and stream version information to the - underlying stream. - - @exception IOException Exception from underlying - OutputStream. - */ - protected void writeStreamHeader () throws IOException + * Writes stream magic and stream version information to the + * underlying stream. + * + * @exception IOException Exception from underlying + * OutputStream. + */ + protected void writeStreamHeader() throws IOException { - realOutput.writeShort (STREAM_MAGIC); - realOutput.writeShort (STREAM_VERSION); + realOutput.writeShort(STREAM_MAGIC); + realOutput.writeShort(STREAM_VERSION); } - - /** * Protected constructor that allows subclasses to override * serialization. This constructor should be called by subclasses @@ -625,11 +627,11 @@ * * @see #writeObjectOverride(Object) */ - protected ObjectOutputStream () throws IOException, SecurityException + protected ObjectOutputStream() throws IOException, SecurityException { SecurityManager sec_man = System.getSecurityManager (); if (sec_man != null) - sec_man.checkPermission (SUBCLASS_IMPLEMENTATION_PERMISSION); + sec_man.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION); useSubclassMethod = true; } @@ -646,10 +648,11 @@ * @exception NotActiveException Subclass has arranged for this * method to be called, but did not implement this method. */ - protected void writeObjectOverride (Object obj) throws NotActiveException, + protected void writeObjectOverride(Object obj) throws NotActiveException, IOException { - throw new NotActiveException ("Subclass of ObjectOutputStream must implement writeObjectOverride"); + throw new NotActiveException + ("Subclass of ObjectOutputStream must implement writeObjectOverride"); } @@ -661,48 +664,48 @@ if (writeDataAsBlocks) { if (blockDataCount == BUFFER_SIZE) - drain (); + drain(); blockData[ blockDataCount++ ] = (byte)data; } else - realOutput.write (data); + realOutput.write(data); } /** * @see DataOutputStream#write(byte[]) */ - public void write (byte[] b) throws IOException + public void write(byte[] b) throws IOException { - write (b, 0, b.length); + write(b, 0, b.length); } /** * @see DataOutputStream#write(byte[],int,int) */ - public void write (byte[] b, int off, int len) throws IOException + public void write(byte[] b, int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) - throw new IndexOutOfBoundsException (); + throw new IndexOutOfBoundsException(); if (blockDataCount + len < BUFFER_SIZE) { - System.arraycopy (b, off, blockData, blockDataCount, len); + System.arraycopy(b, off, blockData, blockDataCount, len); blockDataCount += len; } else { - drain (); - writeBlockDataHeader (len); - realOutput.write (b, off, len); + drain(); + writeBlockDataHeader(len); + realOutput.write(b, off, len); } } else - realOutput.write (b, off, len); + realOutput.write(b, off, len); } @@ -711,8 +714,8 @@ */ public void flush () throws IOException { - drain (); - realOutput.flush (); + drain(); + realOutput.flush(); } @@ -723,14 +726,14 @@ * @exception IOException Exception from underlying * OutputStream. */ - protected void drain () throws IOException + protected void drain() throws IOException { if (blockDataCount == 0) return; if (writeDataAsBlocks) - writeBlockDataHeader (blockDataCount); - realOutput.write (blockData, 0, blockDataCount); + writeBlockDataHeader(blockDataCount); + realOutput.write(blockData, 0, blockDataCount); blockDataCount = 0; } @@ -738,28 +741,28 @@ /** * @see java.io.DataOutputStream#close () */ - public void close () throws IOException + public void close() throws IOException { - flush (); - realOutput.close (); + flush(); + realOutput.close(); } /** * @see java.io.DataOutputStream#writeBoolean (boolean) */ - public void writeBoolean (boolean data) throws IOException + public void writeBoolean(boolean data) throws IOException { - blockDataOutput.writeBoolean (data); + blockDataOutput.writeBoolean(data); } /** * @see java.io.DataOutputStream#writeByte (int) */ - public void writeByte (int data) throws IOException + public void writeByte(int data) throws IOException { - blockDataOutput.writeByte (data); + blockDataOutput.writeByte(data); } @@ -768,79 +771,79 @@ */ public void writeShort (int data) throws IOException { - blockDataOutput.writeShort (data); + blockDataOutput.writeShort(data); } /** * @see java.io.DataOutputStream#writeChar (int) */ - public void writeChar (int data) throws IOException + public void writeChar(int data) throws IOException { - blockDataOutput.writeChar (data); + blockDataOutput.writeChar(data); } /** * @see java.io.DataOutputStream#writeInt (int) */ - public void writeInt (int data) throws IOException + public void writeInt(int data) throws IOException { - blockDataOutput.writeInt (data); + blockDataOutput.writeInt(data); } /** * @see java.io.DataOutputStream#writeLong (long) */ - public void writeLong (long data) throws IOException + public void writeLong(long data) throws IOException { - blockDataOutput.writeLong (data); + blockDataOutput.writeLong(data); } /** * @see java.io.DataOutputStream#writeFloat (float) */ - public void writeFloat (float data) throws IOException + public void writeFloat(float data) throws IOException { - blockDataOutput.writeFloat (data); + blockDataOutput.writeFloat(data); } /** * @see java.io.DataOutputStream#writeDouble (double) */ - public void writeDouble (double data) throws IOException + public void writeDouble(double data) throws IOException { - blockDataOutput.writeDouble (data); + blockDataOutput.writeDouble(data); } /** * @see java.io.DataOutputStream#writeBytes (java.lang.String) */ - public void writeBytes (String data) throws IOException + public void writeBytes(String data) throws IOException { - blockDataOutput.writeBytes (data); + blockDataOutput.writeBytes(data); } /** * @see java.io.DataOutputStream#writeChars (java.lang.String) */ - public void writeChars (String data) throws IOException + public void writeChars(String data) throws IOException { - dataOutput.writeChars (data); + dataOutput.writeChars(data); } /** * @see java.io.DataOutputStream#writeUTF (java.lang.String) */ - public void writeUTF (String data) throws IOException + public void writeUTF(String data) throws IOException { - dataOutput.writeUTF (data); + dataOutput.writeUTF(data); } @@ -868,14 +871,14 @@ public abstract void write (ObjectOutput out) throws IOException; } - public PutField putFields () throws IOException + public PutField putFields() throws IOException { if (currentPutField != null) return currentPutField; - markFieldsWritten (); + markFieldsWritten(); - currentPutField = new PutField () + currentPutField = new PutField() { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; @@ -885,46 +888,46 @@ private ObjectStreamField getField (String name) { ObjectStreamField field - = currentObjectStreamClass.getField (name); + = currentObjectStreamClass.getField(name); if (field == null) throw new IllegalArgumentException("no such serializable field " + name); return field; } - - public void put (String name, boolean value) + + public void put(String name, boolean value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'Z'); + checkType(field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } - public void put (String name, byte value) + public void put(String name, byte value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'B'); - prim_field_data[field.getOffset ()] = value; + checkType(field, 'B'); + prim_field_data[field.getOffset()] = value; } - public void put (String name, char value) + public void put(String name, char value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'C'); - int off = field.getOffset (); + checkType(field, 'C'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } - public void put (String name, double value) + public void put(String name, double value) { ObjectStreamField field = getField (name); - checkType (field, 'D'); - int off = field.getOffset (); + checkType(field, 'D'); + int off = field.getOffset(); long l_value = Double.doubleToLongBits (value); prim_field_data[off++] = (byte)(l_value >>> 52); prim_field_data[off++] = (byte)(l_value >>> 48); @@ -936,35 +939,35 @@ prim_field_data[off] = (byte)l_value; } - public void put (String name, float value) + public void put(String name, float value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'F'); - int off = field.getOffset (); - int i_value = Float.floatToIntBits (value); + checkType(field, 'F'); + int off = field.getOffset(); + int i_value = Float.floatToIntBits(value); prim_field_data[off++] = (byte)(i_value >>> 24); prim_field_data[off++] = (byte)(i_value >>> 16); prim_field_data[off++] = (byte)(i_value >>> 8); prim_field_data[off] = (byte)i_value; } - public void put (String name, int value) + public void put(String name, int value) { - ObjectStreamField field = getField (name); - checkType (field, 'I'); - int off = field.getOffset (); + ObjectStreamField field = getField(name); + checkType(field, 'I'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 24); prim_field_data[off++] = (byte)(value >>> 16); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } - public void put (String name, long value) + public void put(String name, long value) { - ObjectStreamField field = getField (name); - checkType (field, 'J'); - int off = field.getOffset (); + ObjectStreamField field = getField(name); + checkType(field, 'J'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 52); prim_field_data[off++] = (byte)(value >>> 48); prim_field_data[off++] = (byte)(value >>> 40); @@ -975,44 +978,44 @@ prim_field_data[off] = (byte)value; } - public void put (String name, short value) + public void put(String name, short value) { - ObjectStreamField field = getField (name); - checkType (field, 'S'); - int off = field.getOffset (); + ObjectStreamField field = getField(name); + checkType(field, 'S'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } - public void put (String name, Object value) + public void put(String name, Object value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); if (value != null && - ! field.getType ().isAssignableFrom (value.getClass ())) - throw new IllegalArgumentException ("Class " + value.getClass() + - " cannot be cast to " + field.getType()); - objs[field.getOffset ()] = value; + ! field.getType().isAssignableFrom(value.getClass ())) + throw new IllegalArgumentException("Class " + value.getClass() + + " cannot be cast to " + field.getType()); + objs[field.getOffset()] = value; } - public void write (ObjectOutput out) throws IOException + public void write(ObjectOutput out) throws IOException { // Apparently Block data is not used with PutField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. - boolean oldmode = setBlockDataMode (false); - out.write (prim_field_data); + boolean oldmode = setBlockDataMode(false); + out.write(prim_field_data); for (int i = 0; i < objs.length; ++ i) - out.writeObject (objs[i]); - setBlockDataMode (oldmode); + out.writeObject(objs[i]); + setBlockDataMode(oldmode); } - private void checkType (ObjectStreamField field, char type) + private void checkType(ObjectStreamField field, char type) throws IllegalArgumentException { - if (TypeSignature.getEncodingOfClass (field.getType ()).charAt (0) + if (TypeSignature.getEncodingOfClass(field.getType()).charAt(0) != type) - throw new IllegalArgumentException (); + throw new IllegalArgumentException(); } }; // end PutFieldImpl @@ -1021,179 +1024,180 @@ } - public void writeFields () throws IOException + public void writeFields() throws IOException { if (currentPutField == null) - throw new NotActiveException ("writeFields can only be called after putFields has been called"); + throw new NotActiveException("writeFields can only be called after putFields has been called"); - currentPutField.write (this); + currentPutField.write(this); } // write out the block-data buffer, picking the correct header // depending on the size of the buffer - private void writeBlockDataHeader (int size) throws IOException + private void writeBlockDataHeader(int size) throws IOException { if (size < 256) { - realOutput.writeByte (TC_BLOCKDATA); - realOutput.write (size); + realOutput.writeByte(TC_BLOCKDATA); + realOutput.write(size); } else { - realOutput.writeByte (TC_BLOCKDATALONG); - realOutput.writeInt (size); + realOutput.writeByte(TC_BLOCKDATALONG); + realOutput.writeInt(size); } } // lookup the handle for OBJ, return null if OBJ doesn't have a // handle yet - private Integer findHandle (Object obj) + private Integer findHandle(Object obj) { - return (Integer)OIDLookupTable.get (new ObjectIdentityWrapper (obj)); + return (Integer)OIDLookupTable.get(new ObjectIdentityWrapper(obj)); } // assigns the next availible handle to OBJ - private int assignNewHandle (Object obj) + private int assignNewHandle(Object obj) { - OIDLookupTable.put (new ObjectIdentityWrapper (obj), - new Integer (nextOID)); + OIDLookupTable.put(new ObjectIdentityWrapper(obj), + new Integer(nextOID)); return nextOID++; } // resets mapping from objects to handles - private void clearHandles () + private void clearHandles() { nextOID = baseWireHandle; - OIDLookupTable.clear (); + OIDLookupTable.clear(); } // write out array size followed by each element of the array - private void writeArraySizeAndElements (Object array, Class clazz) + private void writeArraySizeAndElements(Object array, Class clazz) throws IOException { - int length = Array.getLength (array); + int length = Array.getLength(array); - if (clazz.isPrimitive ()) + if (clazz.isPrimitive()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeBoolean (cast_array[i]); + for (int i = 0; i < length; i++) + realOutput.writeBoolean(cast_array[i]); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; - realOutput.writeInt (length); + realOutput.writeInt(length); realOutput.write(cast_array, 0, length); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeChar (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeChar(cast_array[i]); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeDouble (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeDouble(cast_array[i]); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeFloat (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeFloat(cast_array[i]); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeInt (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeInt(cast_array[i]); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeLong (cast_array[i]); + for (int i = 0; i < length; i++) + realOutput.writeLong(cast_array[i]); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeShort (cast_array[i]); + for (int i = 0; i < length; i++) + realOutput.writeShort(cast_array[i]); return; } } else { Object[] cast_array = (Object[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - writeObject (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + writeObject(cast_array[i]); } } // writes out FIELDS of OBJECT for the specified ObjectStreamClass. // FIELDS are already in canonical order. - private void writeFields (Object obj, ObjectStreamClass osc) + private void writeFields(Object obj, ObjectStreamClass osc) throws IOException { ObjectStreamField[] fields = osc.fields; - boolean oldmode = setBlockDataMode (false); + boolean oldmode = setBlockDataMode(false); String field_name; Class type; - for (int i=0; i < fields.length; i++) + + for (int i = 0; i < fields.length; i++) { - field_name = fields[i].getName (); - type = fields[i].getType (); + field_name = fields[i].getName(); + type = fields[i].getType(); if (type == Boolean.TYPE) - realOutput.writeBoolean (getBooleanField (obj, osc.forClass(), field_name)); + realOutput.writeBoolean(getBooleanField(obj, osc.forClass(), field_name)); else if (type == Byte.TYPE) - realOutput.writeByte (getByteField (obj, osc.forClass(), field_name)); + realOutput.writeByte(getByteField(obj, osc.forClass(), field_name)); else if (type == Character.TYPE) - realOutput.writeChar (getCharField (obj, osc.forClass(), field_name)); + realOutput.writeChar(getCharField(obj, osc.forClass(), field_name)); else if (type == Double.TYPE) - realOutput.writeDouble (getDoubleField (obj, osc.forClass(), field_name)); + realOutput.writeDouble(getDoubleField(obj, osc.forClass(), field_name)); else if (type == Float.TYPE) - realOutput.writeFloat (getFloatField (obj, osc.forClass(), field_name)); + realOutput.writeFloat(getFloatField(obj, osc.forClass(), field_name)); else if (type == Integer.TYPE) - realOutput.writeInt (getIntField (obj, osc.forClass(), field_name)); + realOutput.writeInt(getIntField(obj, osc.forClass(), field_name)); else if (type == Long.TYPE) - realOutput.writeLong (getLongField (obj, osc.forClass(), field_name)); + realOutput.writeLong(getLongField(obj, osc.forClass(), field_name)); else if (type == Short.TYPE) - realOutput.writeShort (getShortField (obj, osc.forClass(), field_name)); + realOutput.writeShort(getShortField(obj, osc.forClass(), field_name)); else - writeObject (getObjectField (obj, osc.forClass(), field_name, - fields[i].getTypeString ())); + writeObject(getObjectField(obj, osc.forClass(), field_name, + fields[i].getTypeString ())); } - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); } // Toggles writing primitive data to block-data buffer. - private boolean setBlockDataMode (boolean on) throws IOException + private boolean setBlockDataMode(boolean on) throws IOException { if (on == writeDataAsBlocks) return on; @@ -1211,7 +1215,7 @@ } - private void callWriteMethod (Object obj, ObjectStreamClass osc) + private void callWriteMethod(Object obj, ObjectStreamClass osc) throws IOException { Class klass = osc.forClass(); @@ -1219,9 +1223,9 @@ try { Class classArgs[] = {ObjectOutputStream.class}; - Method m = getMethod (klass, "writeObject", classArgs); + Method m = getMethod(klass, "writeObject", classArgs); Object args[] = {this}; - m.invoke (obj, args); + m.invoke(obj, args); } catch (NoSuchMethodException nsme) { @@ -1237,33 +1241,34 @@ throw (IOException) exception; IOException ioe - = new IOException ("Exception thrown from writeObject() on " + - klass + ": " + exception.getClass().getName()); + = new IOException("Exception thrown from writeObject() on " + + klass + ": " + exception.getClass().getName()); ioe.initCause(exception); throw ioe; } catch (Exception x) { IOException ioe - = new IOException ("Failure invoking writeObject() on " + - klass + ": " + x.getClass().getName()); + = new IOException("Failure invoking writeObject() on " + + klass + ": " + x.getClass().getName()); ioe.initCause(x); throw ioe; } } - private boolean getBooleanField (Object obj, Class klass, String field_name) + private boolean getBooleanField(Object obj, Class klass, String field_name) throws IOException { try { - Field f = getField (klass, field_name); - boolean b = f.getBoolean (obj); + Field f = getField(klass, field_name); + boolean b = f.getBoolean(obj); return b; } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1271,7 +1276,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1286,7 +1291,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1294,7 +1300,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1309,7 +1315,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1317,7 +1324,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1332,7 +1339,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1340,7 +1348,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1355,7 +1363,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1363,8 +1372,8 @@ } catch (Exception _) { - throw new IOException (); - } + throw new IOException("Unexpected exception " + _); + } } private int getIntField (Object obj, Class klass, String field_name) @@ -1378,7 +1387,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1386,8 +1396,8 @@ } catch (Exception _) { - throw new IOException (); - } + throw new IOException("Unexpected exception " + _); + } } private long getLongField (Object obj, Class klass, String field_name) @@ -1401,7 +1411,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1409,7 +1420,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1424,7 +1435,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1432,8 +1444,8 @@ } catch (Exception _) { - throw new IOException (); - } + throw new IOException("Unexpected exception " + _); + } } private Object getObjectField (Object obj, Class klass, String field_name, @@ -1446,7 +1458,8 @@ if (of.getTypeString() == null || !of.getTypeString().equals(type_code)) - throw new InvalidClassException("invalid type code for " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid type code for " + field_name + " in class " + klass.getName()); Object o = f.get (obj); // FIXME: We should check the type_code here @@ -1480,7 +1493,8 @@ } catch (java.lang.NoSuchFieldException e) { - throw new InvalidClassException ("no field called " + name + " in class " + klass.getName()); + throw new InvalidClassException + ("no field called " + name + " in class " + klass.getName()); } } @@ -1525,7 +1539,7 @@ { if (Configuration.INIT_LOAD_LIBRARY) { - System.loadLibrary ("javaio"); + System.loadLibrary("javaio"); } } } Index: java/io/ObjectStreamClass.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamClass.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- java/io/ObjectStreamClass.java 28 Dec 2003 17:18:24 -0000 1.26 +++ java/io/ObjectStreamClass.java 28 Dec 2003 18:12:43 -0000 1.27 @@ -2,39 +2,39 @@ about serialized objects. Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. -This file is part of GNU Classpath. + This file is part of GNU Classpath. -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -02111-1307 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ package java.io; @@ -61,23 +61,23 @@ public class ObjectStreamClass implements Serializable { /** - Returns the ObjectStreamClass for cl. - If cl is null, or is not Serializable, - null is returned. ObjectStreamClass's are memorized; - later calls to this method with the same class will return the - same ObjectStreamClass object and no recalculation - will be done. - - @see java.io.Serializable - */ - public static ObjectStreamClass lookup (Class cl) + * Returns the ObjectStreamClass for cl. + * If cl is null, or is not Serializable, + * null is returned. ObjectStreamClass's are memorized; + * later calls to this method with the same class will return the + * same ObjectStreamClass object and no recalculation + * will be done. + * + * @see java.io.Serializable + */ + public static ObjectStreamClass lookup(Class cl) { if (cl == null) return null; - if (! (Serializable.class).isAssignableFrom (cl)) + if (! (Serializable.class).isAssignableFrom(cl)) return null; - return lookupForClassObject (cl); + return lookupForClassObject(cl); } /** @@ -85,57 +85,57 @@ * we have a java.lang.Class object C for class A, though A is not * serializable, but it's okay to serialize C. */ - static ObjectStreamClass lookupForClassObject (Class cl) + static ObjectStreamClass lookupForClassObject(Class cl) { if (cl == null) return null; - ObjectStreamClass osc = (ObjectStreamClass)classLookupTable.get (cl); + ObjectStreamClass osc = (ObjectStreamClass)classLookupTable.get(cl); if (osc != null) return osc; else - { - osc = new ObjectStreamClass (cl); - classLookupTable.put (cl, osc); - return osc; - } + { + osc = new ObjectStreamClass(cl); + classLookupTable.put(cl, osc); + return osc; + } } /** - Returns the name of the class that this - ObjectStreamClass represents. - */ - public String getName () + * Returns the name of the class that this + * ObjectStreamClass represents. + */ + public String getName() { return name; } /** - Returns the class that this ObjectStreamClass - represents. Null could be returned if this - ObjectStreamClass was read from an - ObjectInputStream and the class it represents cannot - be found or loaded. - - @see java.io.ObjectInputStream - */ - public Class forClass () + * Returns the class that this ObjectStreamClass + * represents. Null could be returned if this + * ObjectStreamClass was read from an + * ObjectInputStream and the class it represents cannot + * be found or loaded. + * + * @see java.io.ObjectInputStream + */ + public Class forClass() { return clazz; } /** - Returns the serial version stream-unique identifier for the class - represented by this ObjectStreamClass. This SUID is - either defined by the class as static final long - serialVersionUID or is calculated as specified in - Javasoft's "Object Serialization Specification" XXX: add reference - */ - public long getSerialVersionUID () + * Returns the serial version stream-unique identifier for the class + * represented by this ObjectStreamClass. This SUID is + * either defined by the class as static final long + * serialVersionUID or is calculated as specified in + * Javasoft's "Object Serialization Specification" XXX: add reference + */ + public long getSerialVersionUID() { return uid; } @@ -145,10 +145,10 @@ // of the class represented by this ObjectStreamClass. The Fields // are sorted by name. // XXX doc - public ObjectStreamField[] getFields () + public ObjectStreamField[] getFields() { ObjectStreamField[] copy = new ObjectStreamField[ fields.length ]; - System.arraycopy (fields, 0, copy, 0, fields.length); + System.arraycopy(fields, 0, copy, 0, fields.length); return copy; } @@ -158,8 +158,8 @@ // primitiveness. public ObjectStreamField getField (String name) { - for (int i=0; i < fields.length; i++) - if (fields[i].getName ().equals (name)) + for (int i = 0; i < fields.length; i++) + if (fields[i].getName().equals(name)) return fields[i]; return null; } @@ -174,7 +174,7 @@ * @see #getSerialVersionUID() * @see #getName() */ - public String toString () + public String toString() { return "java.io.ObjectStreamClass< " + name + ", " + uid + " >"; } @@ -187,7 +187,7 @@ // // This method is used by the class to override default // serialization behavior. - boolean hasWriteMethod () + boolean hasWriteMethod() { return (flags & ObjectStreamConstants.SC_WRITE_METHOD) != 0; } @@ -200,24 +200,24 @@ // // This method is used by the class to override default // serialization behavior. - boolean hasReadMethod () + boolean hasReadMethod() { - try + try { - Class[] readObjectParams = { ObjectInputStream.class }; - forClass ().getDeclaredMethod ("readObject", readObjectParams); - return true; + Class[] readObjectParams = { ObjectInputStream.class }; + forClass().getDeclaredMethod("readObject", readObjectParams); + return true; } - catch (NoSuchMethodException e) + catch (NoSuchMethodException e) { - return false; + return false; } } // Returns true iff the class that this ObjectStreamClass represents // implements Serializable but does *not* implement Externalizable. - boolean isSerializable () + boolean isSerializable() { return (flags & ObjectStreamConstants.SC_SERIALIZABLE) != 0; } @@ -225,7 +225,7 @@ // Returns true iff the class that this ObjectStreamClass represents // implements Externalizable. - boolean isExternalizable () + boolean isExternalizable() { return (flags & ObjectStreamConstants.SC_EXTERNALIZABLE) != 0; } @@ -235,7 +235,7 @@ // class that is the superclass of the class this // ObjectStreamClass represents. If the superclass is // not Serializable, null is returned. - ObjectStreamClass getSuper () + ObjectStreamClass getSuper() { return superClass; } @@ -245,30 +245,30 @@ // classes of CLAZZ and CLAZZ itself in order from most super to // CLAZZ. ObjectStreamClass[0] is the highest superclass of CLAZZ // that is serializable. - static ObjectStreamClass[] getObjectStreamClasses (Class clazz) + static ObjectStreamClass[] getObjectStreamClasses(Class clazz) { - ObjectStreamClass osc = ObjectStreamClass.lookup (clazz); + ObjectStreamClass osc = ObjectStreamClass.lookup(clazz); if (osc == null) return new ObjectStreamClass[0]; else - { - Vector oscs = new Vector (); - - while (osc != null) { - oscs.addElement (osc); - osc = osc.getSuper (); - } + Vector oscs = new Vector(); + + while (osc != null) + { + oscs.addElement (osc); + osc = osc.getSuper(); + } - int count = oscs.size (); - ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; + int count = oscs.size(); + ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; - for (int i = count - 1; i >= 0; i--) - sorted_oscs[ count - i - 1 ] = (ObjectStreamClass)oscs.elementAt (i); + for (int i = count - 1; i >= 0; i--) + sorted_oscs[ count - i - 1 ] = (ObjectStreamClass)oscs.elementAt(i); - return sorted_oscs; - } + return sorted_oscs; + } } @@ -276,14 +276,14 @@ // properties of the class represented by this ObjectStreamClass. // The bit-flags that could be present are those defined in // ObjectStreamConstants that begin with `SC_' - int getFlags () + int getFlags() { return flags; } - ObjectStreamClass (String name, long uid, byte flags, - ObjectStreamField[] fields) + ObjectStreamClass(String name, long uid, byte flags, + ObjectStreamField[] fields) { this.name = name; this.uid = uid; @@ -302,11 +302,11 @@ * @throws InvalidClassException if an incompatibility between computed UID and * already set UID is found. */ - void setClass (Class cl, ObjectStreamClass superClass) throws InvalidClassException + void setClass(Class cl, ObjectStreamClass superClass) throws InvalidClassException { this.clazz = cl; - long class_uid = getClassUID (cl); + long class_uid = getClassUID(cl); if (uid == 0) uid = class_uid; else @@ -322,9 +322,9 @@ } } - isProxyClass = clazz != null && Proxy.isProxyClass (clazz); + isProxyClass = clazz != null && Proxy.isProxyClass(clazz); this.superClass = superClass; - calculateOffsets (); + calculateOffsets(); try { @@ -345,47 +345,47 @@ i = 0; j = 0; k = 0; while (i < fields.length && j < exportedFields.length) - { - int comp = fields[i].getName().compareTo (exportedFields[j].getName()); + { + int comp = fields[i].getName().compareTo(exportedFields[j].getName()); + + if (comp < 0) + { + newFieldList[k] = fields[i]; + fields[i].setPersistent(false); + fields[i].setToSet(false); + i++; + } + else if (comp > 0) + { + /* field not found in imported fields. We add it + * in the list of supported fields. + */ + newFieldList[k] = exportedFields[j]; + newFieldList[k].setPersistent(true); + newFieldList[k].setToSet(false); + j++; + } + else + { + if (!fields[i].getType().equals(exportedFields[j].getType())) + throw new InvalidClassException + ("serialPersistentFields must be compatible with" + + " imported fields (about " + fields[i].getName() + ")"); + newFieldList[k] = fields[i]; + fields[i].setPersistent(true); + i++; + j++; + } + k++; + } - if (comp < 0) + if (i < fields.length) + for (;i 0) - { - /* field not found in imported fields. We add it - * in the list of supported fields. - */ - newFieldList[k] = exportedFields[j]; - newFieldList[k].setPersistent(true); - newFieldList[k].setToSet(false); - j++; - } - else - { - if (!fields[i].getType().equals (exportedFields[j].getType())) - throw new InvalidClassException ( - "serialPersistentFields must be compatible with" + - " imported fields (about " + fields[i].getName() + ")"); newFieldList[k] = fields[i]; - fields[i].setPersistent(true); - i++; - j++; } - k++; - } - - if (i < fields.length) - for (;i"); - data_out.writeInt (Modifier.STATIC); - data_out.writeUTF ("()V"); } - Constructor constructor; - Constructor[] constructors = cl.getDeclaredConstructors (); - Arrays.sort (constructors, memberComparator); - for (int i=0; i < constructors.length; i++) + // cl didn't define serialVersionUID, so we have to compute it + try { - constructor = constructors[i]; - modifiers = constructor.getModifiers (); - if (Modifier.isPrivate (modifiers)) - continue; + MessageDigest md; + try + { + md = MessageDigest.getInstance("SHA"); + } + catch (NoSuchAlgorithmException e) + { + // If a provider already provides SHA, use it; otherwise, use this. + Gnu gnuProvider = new Gnu(); + Security.addProvider(gnuProvider); + md = MessageDigest.getInstance("SHA"); + } - data_out.writeUTF (""); - data_out.writeInt (modifiers); + DigestOutputStream digest_out = + new DigestOutputStream(nullOutputStream, md); + DataOutputStream data_out = new DataOutputStream(digest_out); + + data_out.writeUTF(cl.getName()); + + int modifiers = cl.getModifiers(); + // just look at interesting bits + modifiers = modifiers & (Modifier.ABSTRACT | Modifier.FINAL + | Modifier.INTERFACE | Modifier.PUBLIC); + data_out.writeInt(modifiers); + + // Pretend that an array has no interfaces, because when array + // serialization was defined (JDK 1.1), arrays didn't have it. + if (! cl.isArray()) + { + Class[] interfaces = cl.getInterfaces(); + Arrays.sort(interfaces, interfaceComparator); + for (int i = 0; i < interfaces.length; i++) + data_out.writeUTF(interfaces[i].getName()); + } - // the replacement of '/' with '.' was needed to make computed - // SUID's agree with those computed by JDK - data_out.writeUTF ( - TypeSignature.getEncodingOfConstructor (constructor).replace ('/','.')); - } + Field field; + Field[] fields = cl.getDeclaredFields(); + Arrays.sort(fields, memberComparator); + for (int i = 0; i < fields.length; i++) + { + field = fields[i]; + modifiers = field.getModifiers(); + if (Modifier.isPrivate(modifiers) + && (Modifier.isStatic(modifiers) + || Modifier.isTransient(modifiers))) + continue; + + data_out.writeUTF(field.getName()); + data_out.writeInt(modifiers); + data_out.writeUTF(TypeSignature.getEncodingOfClass (field.getType())); + } - Method method; - Method[] methods = cl.getDeclaredMethods (); - Arrays.sort (methods, memberComparator); - for (int i=0; i < methods.length; i++) - { - method = methods[i]; - modifiers = method.getModifiers (); - if (Modifier.isPrivate (modifiers)) - continue; + // write class initializer method if present + if (VMObjectStreamClass.hasClassInitializer(cl)) + { + data_out.writeUTF(""); + data_out.writeInt(Modifier.STATIC); + data_out.writeUTF("()V"); + } - data_out.writeUTF (method.getName ()); - data_out.writeInt (modifiers); + Constructor constructor; + Constructor[] constructors = cl.getDeclaredConstructors(); + Arrays.sort (constructors, memberComparator); + for (int i = 0; i < constructors.length; i++) + { + constructor = constructors[i]; + modifiers = constructor.getModifiers(); + if (Modifier.isPrivate(modifiers)) + continue; + + data_out.writeUTF(""); + data_out.writeInt(modifiers); + + // the replacement of '/' with '.' was needed to make computed + // SUID's agree with those computed by JDK + data_out.writeUTF + (TypeSignature.getEncodingOfConstructor(constructor).replace('/','.')); + } - // the replacement of '/' with '.' was needed to make computed - // SUID's agree with those computed by JDK - data_out.writeUTF ( - TypeSignature.getEncodingOfMethod (method).replace ('/', '.')); - } + Method method; + Method[] methods = cl.getDeclaredMethods(); + Arrays.sort(methods, memberComparator); + for (int i = 0; i < methods.length; i++) + { + method = methods[i]; + modifiers = method.getModifiers(); + if (Modifier.isPrivate(modifiers)) + continue; + + data_out.writeUTF(method.getName()); + data_out.writeInt(modifiers); + + // the replacement of '/' with '.' was needed to make computed + // SUID's agree with those computed by JDK + data_out.writeUTF + (TypeSignature.getEncodingOfMethod(method).replace('/', '.')); + } - data_out.close (); - byte[] sha = md.digest (); - long result = 0; - int len = sha.length < 8 ? sha.length : 8; - for (int i=0; i < len; i++) - result += (long)(sha[i] & 0xFF) << (8 * i); + data_out.close(); + byte[] sha = md.digest(); + long result = 0; + int len = sha.length < 8 ? sha.length : 8; + for (int i = 0; i < len; i++) + result += (long)(sha[i] & 0xFF) << (8 * i); - return result; - } + return result; + } catch (NoSuchAlgorithmException e) - { - throw new RuntimeException ("The SHA algorithm was not found to use in computing the Serial Version UID for class " - + cl.getName (), e); - } + { + throw new RuntimeException + ("The SHA algorithm was not found to use in computing the Serial Version UID for class " + + cl.getName(), e); + } catch (IOException ioe) - { - throw new RuntimeException (ioe); - } + { + throw new RuntimeException(ioe); + } } /** @@ -713,7 +719,7 @@ * @param clazz Class to retrieve 'serialPersistentFields' from. * @return The content of 'serialPersistentFields'. */ - private ObjectStreamField[] getSerialPersistentFields (Class clazz) + private ObjectStreamField[] getSerialPersistentFields(Class clazz) throws NoSuchFieldException, IllegalAccessException { ObjectStreamField[] fieldsArray = null; @@ -721,16 +727,16 @@ // Use getDeclaredField rather than getField for the same reason // as above in getDefinedSUID. - Field f = clazz.getDeclaredField ("serialPersistentFields"); + Field f = clazz.getDeclaredField("serialPersistentFields"); f.setAccessible(true); int modifiers = f.getModifiers(); - if (!(Modifier.isStatic (modifiers) && - Modifier.isFinal (modifiers) && - Modifier.isPrivate (modifiers))) + if (!(Modifier.isStatic(modifiers) && + Modifier.isFinal(modifiers) && + Modifier.isPrivate(modifiers))) return null; - o = (ObjectStreamField[])f.get (null); + o = (ObjectStreamField[])f.get(null); if (o == null) return null; @@ -743,10 +749,10 @@ public static final ObjectStreamField[] NO_FIELDS = {}; - private static Hashtable classLookupTable = new Hashtable (); - private static final NullOutputStream nullOutputStream = new NullOutputStream (); - private static final Comparator interfaceComparator = new InterfaceComparator (); - private static final Comparator memberComparator = new MemberComparator (); + private static Hashtable classLookupTable = new Hashtable(); + private static final NullOutputStream nullOutputStream = new NullOutputStream(); + private static final Comparator interfaceComparator = new InterfaceComparator(); + private static final Comparator memberComparator = new MemberComparator(); private static final Class[] writeMethodArgTypes = { java.io.ObjectOutputStream.class }; @@ -776,9 +782,9 @@ // interfaces are compared only by name class InterfaceComparator implements Comparator { - public int compare (Object o1, Object o2) + public int compare(Object o1, Object o2) { - return ((Class)o1).getName ().compareTo (((Class)o2).getName ()); + return ((Class)o1).getName().compareTo(((Class)o2).getName()); } } @@ -787,16 +793,16 @@ // conflicts are resolved by comparing type signatures class MemberComparator implements Comparator { - public int compare (Object o1, Object o2) + public int compare(Object o1, Object o2) { Member m1 = (Member)o1; Member m2 = (Member)o2; - int comp = m1.getName ().compareTo (m2.getName ()); + int comp = m1.getName().compareTo(m2.getName()); if (comp == 0) - return TypeSignature.getEncodingOfMember (m1). - compareTo (TypeSignature.getEncodingOfMember (m2)); + return TypeSignature.getEncodingOfMember(m1). + compareTo(TypeSignature.getEncodingOfMember(m2)); else return comp; } --------------080803080601090601090201-- From MAILER-DAEMON Sun Dec 28 17:38:04 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AajXw-0001Bx-IC for mharc-commit-classpath@gnu.org; Sun, 28 Dec 2003 17:38:04 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AajXt-0001Br-CF for commit-classpath@gnu.org; Sun, 28 Dec 2003 17:38:01 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AajXM-00016a-VC for commit-classpath@gnu.org; Sun, 28 Dec 2003 17:38:00 -0500 Received: from [62.4.16.100] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AajXL-00016V-CN for commit-classpath@gnu.org; Sun, 28 Dec 2003 17:37:27 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 572CD41327 for ; Sun, 28 Dec 2003 22:35:44 +0100 (CET) Message-ID: <3FEF4CCE.8060606@kaffe.org> Date: Sun, 28 Dec 2003 22:36:14 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------070608090302090203070904" Subject: FYI: Reindented code in serialization. X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 22:38:02 -0000 This is a multi-part message in MIME format. --------------070608090302090203070904 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit With patch. --------------070608090302090203070904 Content-Type: text/plain; name="patch_stream" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_stream" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1732 retrieving revision 1.1733 diff -u -r1.1732 -r1.1733 --- ChangeLog 28 Dec 2003 17:18:24 -0000 1.1732 +++ ChangeLog 28 Dec 2003 18:12:43 -0000 1.1733 @@ -1,5 +1,12 @@ 2003-12-28 Guilhem Lavaux + * java/io/ObjectOutputStream.java, + java/io/ObjectInputStream.java, + java/io/ObjectStreamClass.java: Reindented. Some exception message + has been added. + +2003-12-28 Guilhem Lavaux + * java/io/ObjectOutputStream.java (writeClassDescriptor): Externalizable class must also write their hierarchy. Index: java/io/ObjectInputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectInputStream.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- java/io/ObjectInputStream.java 28 Dec 2003 17:18:24 -0000 1.34 +++ java/io/ObjectInputStream.java 28 Dec 2003 18:12:43 -0000 1.35 @@ -73,7 +73,7 @@ * * @see #readStreamHeader() */ - public ObjectInputStream (InputStream in) + public ObjectInputStream(InputStream in) throws IOException, StreamCorruptedException { if (Configuration.DEBUG) @@ -96,13 +96,13 @@ this.blockDataPosition = 0; this.blockDataBytes = 0; this.blockData = new byte[BUFFER_SIZE]; - this.blockDataInput = new DataInputStream (this); - this.realInputStream = new DataInputStream (in); + this.blockDataInput = new DataInputStream(this); + this.realInputStream = new DataInputStream(in); this.nextOID = baseWireHandle; this.objectLookupTable = new Hashtable(); this.validators = new Vector(); this.classLookupTable = new Hashtable(); - setBlockDataMode (true); + setBlockDataMode(true); readStreamHeader(); } @@ -122,10 +122,10 @@ * @exception IOException Exception from underlying * InputStream. */ - public final Object readObject () throws ClassNotFoundException, IOException + public final Object readObject() throws ClassNotFoundException, IOException { if (this.useSubclassMethod) - return readObjectOverride (); + return readObjectOverride(); boolean was_deserializing; @@ -133,12 +133,12 @@ was_deserializing = this.isDeserializing; boolean is_consumed = false; - boolean old_mode = setBlockDataMode (false); + boolean old_mode = setBlockDataMode(false); this.isDeserializing = true; - byte marker = this.realInputStream.readByte (); - dumpElement ("MARKER: 0x" + Integer.toHexString(marker) + " "); + byte marker = this.realInputStream.readByte(); + dumpElement("MARKER: 0x" + Integer.toHexString(marker) + " "); try { @@ -155,43 +155,43 @@ case TC_BLOCKDATALONG: { if (marker == TC_BLOCKDATALONG) - dumpElementln ("BLOCKDATALONG"); + dumpElementln("BLOCKDATALONG"); else - dumpElementln ("BLOCKDATA"); - readNextBlock (marker); - throw new StreamCorruptedException ("Unexpected blockData"); + dumpElementln("BLOCKDATA"); + readNextBlock(marker); + throw new StreamCorruptedException("Unexpected blockData"); } case TC_NULL: { - dumpElementln ("NULL"); + dumpElementln("NULL"); ret_val = null; break; } case TC_REFERENCE: { - dumpElement ("REFERENCE "); - Integer oid = new Integer (this.realInputStream.readInt ()); - dumpElementln (Integer.toHexString(oid.intValue())); + dumpElement("REFERENCE "); + Integer oid = new Integer(this.realInputStream.readInt()); + dumpElementln(Integer.toHexString(oid.intValue())); ret_val = ((ObjectIdentityWrapper) - this.objectLookupTable.get (oid)).object; + this.objectLookupTable.get(oid)).object; break; } case TC_CLASS: { - dumpElementln ("CLASS"); - ObjectStreamClass osc = (ObjectStreamClass)readObject (); - Class clazz = osc.forClass (); - assignNewHandle (clazz); + dumpElementln("CLASS"); + ObjectStreamClass osc = (ObjectStreamClass)readObject(); + Class clazz = osc.forClass(); + assignNewHandle(clazz); ret_val = clazz; break; } case TC_PROXYCLASSDESC: { - dumpElementln ("PROXYCLASS"); + dumpElementln("PROXYCLASS"); int n_intf = this.realInputStream.readInt(); String[] intfs = new String[n_intf]; for (int i = 0; i < n_intf; i++) @@ -200,41 +200,41 @@ System.out.println(intfs[i]); } - boolean oldmode = setBlockDataMode (true); + boolean oldmode = setBlockDataMode(true); Class cl = resolveProxyClass(intfs); setBlockDataMode(oldmode); - ObjectStreamClass osc = lookupClass (cl); - assignNewHandle (osc); + ObjectStreamClass osc = lookupClass(cl); + assignNewHandle(osc); if (!is_consumed) { - byte b = this.realInputStream.readByte (); + byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) - throw new IOException ("Data annotated to class was not consumed." + b); + throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; - ObjectStreamClass superosc = (ObjectStreamClass)readObject (); - osc.setSuperclass (superosc); + ObjectStreamClass superosc = (ObjectStreamClass)readObject(); + osc.setSuperclass(superosc); ret_val = osc; break; } case TC_CLASSDESC: { - ObjectStreamClass osc = readClassDescriptor (); + ObjectStreamClass osc = readClassDescriptor(); if (!is_consumed) { - byte b = this.realInputStream.readByte (); + byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) - throw new IOException ("Data annotated to class was not consumed." + b); + throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; - osc.setSuperclass ((ObjectStreamClass)readObject ()); + osc.setSuperclass ((ObjectStreamClass)readObject()); ret_val = osc; break; } @@ -242,105 +242,107 @@ case TC_STRING: case TC_LONGSTRING: { - dumpElement ("STRING="); - String s = this.realInputStream.readUTF (); - dumpElementln (s); - ret_val = processResolution (s, assignNewHandle (s)); + dumpElement("STRING="); + String s = this.realInputStream.readUTF(); + dumpElementln(s); + ret_val = processResolution(s, assignNewHandle(s)); break; } case TC_ARRAY: { - dumpElementln ("ARRAY"); - ObjectStreamClass osc = (ObjectStreamClass)readObject (); - Class componentType = osc.forClass ().getComponentType (); - dumpElement ("ARRAY LENGTH="); - int length = this.realInputStream.readInt (); + dumpElementln("ARRAY"); + ObjectStreamClass osc = (ObjectStreamClass)readObject(); + Class componentType = osc.forClass().getComponentType(); + dumpElement("ARRAY LENGTH="); + int length = this.realInputStream.readInt(); dumpElementln (length + "; COMPONENT TYPE=" + componentType); - Object array = Array.newInstance (componentType, length); - int handle = assignNewHandle (array); - readArrayElements (array, componentType); - for (int i=0, len=Array.getLength(array); i < len; i++) - dumpElementln (" ELEMENT[" + i + "]=" + Array.get(array, i)); - ret_val = processResolution (array, handle); + Object array = Array.newInstance(componentType, length); + int handle = assignNewHandle(array); + readArrayElements(array, componentType); + for (int i = 0, len = Array.getLength(array); i < len; i++) + dumpElementln(" ELEMENT[" + i + "]=" + Array.get(array, i)); + ret_val = processResolution(array, handle); break; } case TC_OBJECT: { - dumpElementln ("OBJECT"); - ObjectStreamClass osc = (ObjectStreamClass)readObject (); - Class clazz = osc.forClass (); + dumpElementln("OBJECT"); + ObjectStreamClass osc = (ObjectStreamClass)readObject(); + Class clazz = osc.forClass(); - if (!Serializable.class.isAssignableFrom (clazz)) - throw new NotSerializableException (clazz + " is not Serializable, and thus cannot be deserialized."); + if (!Serializable.class.isAssignableFrom(clazz)) + throw new NotSerializableException + (clazz + " is not Serializable, and thus cannot be deserialized."); - if (Externalizable.class.isAssignableFrom (clazz)) + if (Externalizable.class.isAssignableFrom(clazz)) { Externalizable obj = null; try { - obj = (Externalizable)clazz.newInstance (); + obj = (Externalizable)clazz.newInstance(); } catch (InstantiationException e) { - throw new ClassNotFoundException ("Instance of " + clazz - + " could not be created"); + throw new ClassNotFoundException + ("Instance of " + clazz + " could not be created"); } catch (IllegalAccessException e) { - throw new ClassNotFoundException ("Instance of " + clazz - + " could not be created because class or zero-argument constructor is not accessible"); + throw new ClassNotFoundException + ("Instance of " + clazz + " could not be created because class or " + + "zero-argument constructor is not accessible"); } catch (NoSuchMethodError e) { - throw new ClassNotFoundException ("Instance of " + clazz - + " could not be created because zero-argument constructor is not defined"); + throw new ClassNotFoundException + ("Instance of " + clazz + + " could not be created because zero-argument constructor is not defined"); } - int handle = assignNewHandle (obj); + int handle = assignNewHandle(obj); - boolean read_from_blocks = ((osc.getFlags () & SC_BLOCK_DATA) != 0); + boolean read_from_blocks = ((osc.getFlags() & SC_BLOCK_DATA) != 0); boolean oldmode = this.readDataFromBlock; if (read_from_blocks) - setBlockDataMode (true); + setBlockDataMode(true); - obj.readExternal (this); + obj.readExternal(this); if (read_from_blocks) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); - ret_val = processResolution (obj, handle); + ret_val = processResolution(obj, handle); break; } // end if (Externalizable.class.isAssignableFrom (clazz)) // find the first non-serializable, non-abstract // class in clazz's inheritance hierarchy - Class first_nonserial = clazz.getSuperclass (); - while (Serializable.class.isAssignableFrom (first_nonserial) - || Modifier.isAbstract (first_nonserial.getModifiers ())) - first_nonserial = first_nonserial.getSuperclass (); + Class first_nonserial = clazz.getSuperclass(); + while (Serializable.class.isAssignableFrom(first_nonserial) + || Modifier.isAbstract(first_nonserial.getModifiers())) + first_nonserial = first_nonserial.getSuperclass(); Object obj = null; - obj = newObject (clazz, first_nonserial); + obj = newObject(clazz, first_nonserial); if (obj == null) - throw new ClassNotFoundException ("Instance of " + clazz + - " could not be created"); + throw new ClassNotFoundException + ("Instance of " + clazz + " could not be created"); - int handle = assignNewHandle (obj); + int handle = assignNewHandle(obj); this.currentObject = obj; ObjectStreamClass[] hierarchy = - inputGetObjectStreamClasses (clazz); + inputGetObjectStreamClasses(clazz); - for (int i=0; i < hierarchy.length; i++) + for (int i = 0; i < hierarchy.length; i++) { this.currentObjectStreamClass = hierarchy[i]; - dumpElementln ("Reading fields of " - + this.currentObjectStreamClass.getName ()); + dumpElementln("Reading fields of " + this.currentObjectStreamClass.getName ()); // XXX: should initialize fields in classes in the hierarchy // that aren't in the stream @@ -350,68 +352,69 @@ if (this.currentObjectStreamClass.hasReadMethod()) { fieldsAlreadyRead = false; - boolean oldmode = setBlockDataMode (true); - callReadMethod (obj, this.currentObjectStreamClass); - setBlockDataMode (oldmode); - dumpElement ("ENDBLOCKDATA? "); + boolean oldmode = setBlockDataMode(true); + callReadMethod(obj, this.currentObjectStreamClass); + setBlockDataMode(oldmode); + dumpElement("ENDBLOCKDATA? "); try { // FIXME: XXX: This try block is to catch EOF which is // thrown for some objects. That indicates a bug in the logic. - if (this.realInputStream.readByte () != TC_ENDBLOCKDATA) - throw new IOException ("No end of block data seen for class with readObject (ObjectInputStream) method."); - dumpElementln ("yes"); + if (this.realInputStream.readByte() != TC_ENDBLOCKDATA) + throw new IOException + ("No end of block data seen for class with readObject (ObjectInputStream) method."); + dumpElementln("yes"); } catch (EOFException e) { - dumpElementln ("no, got EOFException"); + dumpElementln("no, got EOFException"); } catch (IOException e) { - dumpElementln ("no, got IOException"); + dumpElementln("no, got IOException"); } } else { - readFields (obj, currentObjectStreamClass); + readFields(obj, currentObjectStreamClass); } } this.currentObject = null; this.currentObjectStreamClass = null; - ret_val = processResolution (obj, handle); + ret_val = processResolution(obj, handle); break; } case TC_RESET: - dumpElementln ("RESET"); - clearHandles (); - ret_val = readObject (); + dumpElementln("RESET"); + clearHandles(); + ret_val = readObject(); break; case TC_EXCEPTION: { - dumpElement ("EXCEPTION="); - Exception e = (Exception)readObject (); - dumpElementln (e.toString()); - clearHandles (); - throw new WriteAbortedException ("Exception thrown during writing of stream", e); + dumpElement("EXCEPTION="); + Exception e = (Exception)readObject(); + dumpElementln(e.toString()); + clearHandles(); + throw new WriteAbortedException("Exception thrown during writing of stream", e); } default: - throw new IOException ("Unknown marker on stream: " + marker); + throw new IOException("Unknown marker on stream: " + marker); } } finally { - setBlockDataMode (old_mode); + setBlockDataMode(old_mode); this.isDeserializing = was_deserializing; if (! was_deserializing) { - if (validators.size () > 0) - invokeValidators (); + if (validators.size() > 0) + invokeValidators(); } } @@ -434,30 +437,30 @@ * @throws InvalidClassException If there was a compatibility problem * between the class present in the system and the serialized class. */ - protected ObjectStreamClass readClassDescriptor () + protected ObjectStreamClass readClassDescriptor() throws ClassNotFoundException, IOException { - dumpElement ("CLASSDESC NAME="); - String name = this.realInputStream.readUTF (); - dumpElement (name + "; UID="); + dumpElement("CLASSDESC NAME="); + String name = this.realInputStream.readUTF(); + dumpElement(name + "; UID="); long uid = this.realInputStream.readLong (); - dumpElement (Long.toHexString(uid) + "; FLAGS="); + dumpElement(Long.toHexString(uid) + "; FLAGS="); byte flags = this.realInputStream.readByte (); - dumpElement (Integer.toHexString(flags) + "; FIELD COUNT="); - short field_count = this.realInputStream.readShort (); - dumpElementln (Short.toString(field_count)); + dumpElement(Integer.toHexString(flags) + "; FIELD COUNT="); + short field_count = this.realInputStream.readShort(); + dumpElementln(Short.toString(field_count)); ObjectStreamField[] fields = new ObjectStreamField[field_count]; - ObjectStreamClass osc = new ObjectStreamClass (name, uid, - flags, fields); - assignNewHandle (osc); + ObjectStreamClass osc = new ObjectStreamClass(name, uid, + flags, fields); + assignNewHandle(osc); - for (int i=0; i < field_count; i++) + for (int i = 0; i < field_count; i++) { - dumpElement (" TYPE CODE="); - char type_code = (char)this.realInputStream.readByte (); - dumpElement (type_code + "; FIELD NAME="); - String field_name = this.realInputStream.readUTF (); - dumpElementln (field_name); + dumpElement(" TYPE CODE="); + char type_code = (char)this.realInputStream.readByte(); + dumpElement(type_code + "; FIELD NAME="); + String field_name = this.realInputStream.readUTF(); + dumpElementln(field_name); String class_name; // If the type code is an array or an object we must @@ -465,9 +468,9 @@ // the type code and pass it to ObjectStreamField. // Type codes are decoded by gnu.java.lang.reflect.TypeSignature. if (type_code == 'L' || type_code == '[') - class_name = (String)readObject (); + class_name = (String)readObject(); else - class_name = String.valueOf (type_code); + class_name = String.valueOf(type_code); fields[i] = new ObjectStreamField(field_name, class_name, currentLoader()); @@ -495,11 +498,11 @@ } } - boolean oldmode = setBlockDataMode (true); - osc.setClass (clazz, lookupClass(clazz.getSuperclass())); + boolean oldmode = setBlockDataMode(true); + osc.setClass(clazz, lookupClass(clazz.getSuperclass())); classLookupTable.put(clazz, osc); - setBlockDataMode (oldmode); - + setBlockDataMode(oldmode); + return osc; } @@ -522,7 +525,7 @@ * @exception IOException Exception from underlying * OutputStream. */ - public void defaultReadObject () + public void defaultReadObject() throws ClassNotFoundException, IOException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) @@ -535,7 +538,7 @@ + "defaultReadObject or readFields)"); boolean oldmode = setBlockDataMode(false); - readFields (this.currentObject, this.currentObjectStreamClass); + readFields(this.currentObject, this.currentObjectStreamClass); setBlockDataMode(oldmode); fieldsAlreadyRead = true; @@ -560,20 +563,20 @@ * validator outside of the readObject method of the * object currently being deserialized */ - public void registerValidation (ObjectInputValidation validator, - int priority) + public void registerValidation(ObjectInputValidation validator, + int priority) throws InvalidObjectException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) - throw new NotActiveException ("registerValidation called by non-active " - +"class and/or object"); + throw new NotActiveException("registerValidation called by non-active " + + "class and/or object"); if (validator == null) - throw new InvalidObjectException ("attempt to add a null " - +"ObjectInputValidation object"); + throw new InvalidObjectException("attempt to add a null " + + "ObjectInputValidation object"); - this.validators.addElement (new ValidatorAndPriority (validator, - priority)); + this.validators.addElement(new ValidatorAndPriority (validator, + priority)); } @@ -593,7 +596,7 @@ * * @see java.io.ObjectOutputStream#annotateClass (java.lang.Class) */ - protected Class resolveClass (ObjectStreamClass osc) + protected Class resolveClass(ObjectStreamClass osc) throws ClassNotFoundException, IOException { return Class.forName(osc.getName(), true, currentLoader()); @@ -609,7 +612,7 @@ */ private ClassLoader currentLoader() { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm == null) sm = new SecurityManager () {}; @@ -627,13 +630,13 @@ * @return A valid instance of ObjectStreamClass corresponding * to the specified class. */ - private ObjectStreamClass lookupClass (Class clazz) + private ObjectStreamClass lookupClass(Class clazz) { ObjectStreamClass oclazz; - oclazz = (ObjectStreamClass) classLookupTable.get(clazz); + oclazz = (ObjectStreamClass)classLookupTable.get(clazz); if (oclazz == null) - return ObjectStreamClass.lookup (clazz); + return ObjectStreamClass.lookup(clazz); else return oclazz; } @@ -650,9 +653,9 @@ * @return An array of valid {@link java.io.ObjectStreamClass} instances which * represent the class hierarchy for clazz. */ - private ObjectStreamClass[] inputGetObjectStreamClasses (Class clazz) + private ObjectStreamClass[] inputGetObjectStreamClasses(Class clazz) { - ObjectStreamClass osc = lookupClass (clazz); + ObjectStreamClass osc = lookupClass(clazz); ObjectStreamClass[] ret_val; @@ -691,36 +694,40 @@ * * @see #enableResolveObject(boolean) */ - protected Object resolveObject (Object obj) throws IOException + protected Object resolveObject(Object obj) throws IOException { return obj; } - protected Class resolveProxyClass (String[] intfs) + protected Class resolveProxyClass(String[] intfs) throws IOException, ClassNotFoundException { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm == null) - sm = new SecurityManager () {}; + sm = new SecurityManager() {}; - ClassLoader cl = currentClassLoader (sm); + ClassLoader cl = currentClassLoader(sm); Class[] clss = new Class[intfs.length]; - if(cl == null){ - for (int i = 0; i < intfs.length; i++) - clss[i] = Class.forName(intfs[i]); - cl = ClassLoader.getSystemClassLoader(); - } + if(cl == null) + { + for (int i = 0; i < intfs.length; i++) + clss[i] = Class.forName(intfs[i]); + cl = ClassLoader.getSystemClassLoader(); + } else for (int i = 0; i < intfs.length; i++) clss[i] = cl.loadClass(intfs[i]); - try { - return Proxy.getProxyClass(cl, clss); - } catch (IllegalArgumentException e) { - throw new ClassNotFoundException(null, e); - } + try + { + return Proxy.getProxyClass(cl, clss); + } + catch (IllegalArgumentException e) + { + throw new ClassNotFoundException(null, e); + } } /** @@ -736,9 +743,9 @@ { if (enable) { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm != null) - sm.checkPermission (new SerializablePermission ("enableSubstitution")); + sm.checkPermission(new SerializablePermission("enableSubstitution")); } boolean old_val = this.resolveEnabled; @@ -755,31 +762,31 @@ * @exception StreamCorruptedException An invalid stream magic * number or stream version was read from the stream. */ - protected void readStreamHeader () + protected void readStreamHeader() throws IOException, StreamCorruptedException { - dumpElement ("STREAM MAGIC "); - if (this.realInputStream.readShort () != STREAM_MAGIC) - throw new StreamCorruptedException ("Invalid stream magic number"); + dumpElement("STREAM MAGIC "); + if (this.realInputStream.readShort() != STREAM_MAGIC) + throw new StreamCorruptedException("Invalid stream magic number"); - dumpElementln ("STREAM VERSION "); - if (this.realInputStream.readShort () != STREAM_VERSION) - throw new StreamCorruptedException ("Invalid stream version number"); + dumpElementln("STREAM VERSION "); + if (this.realInputStream.readShort() != STREAM_VERSION) + throw new StreamCorruptedException("Invalid stream version number"); } - public int read () throws IOException + public int read() throws IOException { if (this.readDataFromBlock) { if (this.blockDataPosition >= this.blockDataBytes) - readNextBlock (); + readNextBlock(); return (this.blockData[this.blockDataPosition++] & 0xff); } else - return this.realInputStream.read (); + return this.realInputStream.read(); } - public int read (byte[] data, int offset, int length) throws IOException + public int read(byte[] data, int offset, int length) throws IOException { if (this.readDataFromBlock) { @@ -788,25 +795,25 @@ int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { - System.arraycopy (this.blockData, this.blockDataPosition, - data, offset, remain); + System.arraycopy(this.blockData, this.blockDataPosition, + data, offset, remain); offset += remain; length -= remain; } readNextBlock (); } - System.arraycopy (this.blockData, this.blockDataPosition, - data, offset, length); + System.arraycopy(this.blockData, this.blockDataPosition, + data, offset, length); this.blockDataPosition += length; return length; } else - return this.realInputStream.read (data, offset, length); + return this.realInputStream.read(data, offset, length); } - public int available () throws IOException + public int available() throws IOException { if (this.readDataFromBlock) { @@ -816,15 +823,15 @@ return this.blockDataBytes - this.blockDataPosition; } else - return this.realInputStream.available (); + return this.realInputStream.available(); } - public void close () throws IOException + public void close() throws IOException { - this.realInputStream.close (); + this.realInputStream.close(); } - public boolean readBoolean () throws IOException + public boolean readBoolean() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; @@ -838,160 +845,160 @@ return value; } - public byte readByte () throws IOException + public byte readByte() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - byte value = this.dataInputStream.readByte (); + oldmode = setBlockDataMode(true); + byte value = this.dataInputStream.readByte(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public int readUnsignedByte () throws IOException + public int readUnsignedByte() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - int value = this.dataInputStream.readUnsignedByte (); + oldmode = setBlockDataMode(true); + int value = this.dataInputStream.readUnsignedByte(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public short readShort () throws IOException + public short readShort() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - short value = this.dataInputStream.readShort (); + oldmode = setBlockDataMode(true); + short value = this.dataInputStream.readShort(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public int readUnsignedShort () throws IOException + public int readUnsignedShort() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - int value = this.dataInputStream.readUnsignedShort (); + oldmode = setBlockDataMode(true); + int value = this.dataInputStream.readUnsignedShort(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public char readChar () throws IOException + public char readChar() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - char value = this.dataInputStream.readChar (); + oldmode = setBlockDataMode(true); + char value = this.dataInputStream.readChar(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public int readInt () throws IOException + public int readInt() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - int value = this.dataInputStream.readInt (); + oldmode = setBlockDataMode(true); + int value = this.dataInputStream.readInt(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public long readLong () throws IOException + public long readLong() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - long value = this.dataInputStream.readLong (); + oldmode = setBlockDataMode(true); + long value = this.dataInputStream.readLong(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public float readFloat () throws IOException + public float readFloat() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - float value = this.dataInputStream.readFloat (); + oldmode = setBlockDataMode(true); + float value = this.dataInputStream.readFloat(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public double readDouble () throws IOException + public double readDouble() throws IOException { boolean switchmode = true; boolean oldmode = this.readDataFromBlock; if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8) switchmode = false; if (switchmode) - oldmode = setBlockDataMode (true); - double value = this.dataInputStream.readDouble (); + oldmode = setBlockDataMode(true); + double value = this.dataInputStream.readDouble(); if (switchmode) - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); return value; } - public void readFully (byte data[]) throws IOException + public void readFully(byte data[]) throws IOException { - this.dataInputStream.readFully (data); + this.dataInputStream.readFully(data); } - public void readFully (byte data[], int offset, int size) + public void readFully(byte data[], int offset, int size) throws IOException { - this.dataInputStream.readFully (data, offset, size); + this.dataInputStream.readFully(data, offset, size); } - public int skipBytes (int len) throws IOException + public int skipBytes(int len) throws IOException { - return this.dataInputStream.skipBytes (len); + return this.dataInputStream.skipBytes(len); } /** * @deprecated * @see java.io.DataInputStream#readLine () */ - public String readLine () throws IOException + public String readLine() throws IOException { - return this.dataInputStream.readLine (); + return this.dataInputStream.readLine(); } - public String readUTF () throws IOException + public String readUTF() throws IOException { - return this.dataInputStream.readUTF (); + return this.dataInputStream.readUTF(); } /** @@ -1002,36 +1009,36 @@ */ public static abstract class GetField { - public abstract ObjectStreamClass getObjectStreamClass (); + public abstract ObjectStreamClass getObjectStreamClass(); - public abstract boolean defaulted (String name) + public abstract boolean defaulted(String name) throws IOException, IllegalArgumentException; - public abstract boolean get (String name, boolean defvalue) + public abstract boolean get(String name, boolean defvalue) throws IOException, IllegalArgumentException; - public abstract char get (String name, char defvalue) + public abstract char get(String name, char defvalue) throws IOException, IllegalArgumentException; - public abstract byte get (String name, byte defvalue) + public abstract byte get(String name, byte defvalue) throws IOException, IllegalArgumentException; - public abstract short get (String name, short defvalue) + public abstract short get(String name, short defvalue) throws IOException, IllegalArgumentException; - public abstract int get (String name, int defvalue) + public abstract int get(String name, int defvalue) throws IOException, IllegalArgumentException; - public abstract long get (String name, long defvalue) + public abstract long get(String name, long defvalue) throws IOException, IllegalArgumentException; - public abstract float get (String name, float defvalue) + public abstract float get(String name, float defvalue) throws IOException, IllegalArgumentException; - public abstract double get (String name, double defvalue) + public abstract double get(String name, double defvalue) throws IOException, IllegalArgumentException; - public abstract Object get (String name, Object defvalue) + public abstract Object get(String name, Object defvalue) throws IOException, IllegalArgumentException; } @@ -1048,18 +1055,18 @@ * @throws ClassNotFoundException * @throws NotActiveException */ - public GetField readFields () + public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) - throw new NotActiveException ("readFields called by non-active class and/or object"); + throw new NotActiveException("readFields called by non-active class and/or object"); if (prereadFields != null) return prereadFields; if (fieldsAlreadyRead) - throw new NotActiveException ("readFields called but fields already read from" - + " stream (by defaultReadObject or readFields)"); + throw new NotActiveException("readFields called but fields already read from" + + " stream (by defaultReadObject or readFields)"); final ObjectStreamClass clazz = this.currentObjectStreamClass; final byte[] prim_field_data = new byte[clazz.primFieldSize]; @@ -1068,20 +1075,20 @@ // Apparently Block data is not used with GetField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. - boolean oldmode = setBlockDataMode (false); - readFully (prim_field_data); + boolean oldmode = setBlockDataMode(false); + readFully(prim_field_data); for (int i = 0; i < objs.length; ++ i) - objs[i] = readObject (); - setBlockDataMode (oldmode); + objs[i] = readObject(); + setBlockDataMode(oldmode); prereadFields = new GetField() { - public ObjectStreamClass getObjectStreamClass () + public ObjectStreamClass getObjectStreamClass() { return clazz; } - public boolean defaulted (String name) + public boolean defaulted(String name) throws IOException, IllegalArgumentException { ObjectStreamField f = clazz.getField(name); @@ -1107,69 +1114,69 @@ } catch (NoSuchFieldException e) { - throw new IllegalArgumentException (e.getMessage()); + throw new IllegalArgumentException(e.getMessage()); } } - public boolean get (String name, boolean defvalue) + public boolean get(String name, boolean defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Boolean.TYPE); + ObjectStreamField field = getField(name, Boolean.TYPE); if (field == null) return defvalue; - return prim_field_data[field.getOffset ()] == 0 ? false : true; + return prim_field_data[field.getOffset()] == 0 ? false : true; } - public char get (String name, char defvalue) + public char get(String name, char defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Character.TYPE); + ObjectStreamField field = getField(name, Character.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return (char)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } - public byte get (String name, byte defvalue) + public byte get(String name, byte defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Byte.TYPE); + ObjectStreamField field = getField(name, Byte.TYPE); if (field == null) return defvalue; - return prim_field_data[field.getOffset ()]; + return prim_field_data[field.getOffset()]; } - public short get (String name, short defvalue) + public short get(String name, short defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Short.TYPE); + ObjectStreamField field = getField(name, Short.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return (short)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } - public int get (String name, int defvalue) + public int get(String name, int defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Integer.TYPE); + ObjectStreamField field = getField(name, Integer.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return ((prim_field_data[off++] & 0xFF) << 24) | ((prim_field_data[off++] & 0xFF) << 16) @@ -1177,15 +1184,15 @@ | (prim_field_data[off] & 0xFF); } - public long get (String name, long defvalue) + public long get(String name, long defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Long.TYPE); + ObjectStreamField field = getField(name, Long.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return (long)(((prim_field_data[off++] & 0xFF) << 56) | ((prim_field_data[off++] & 0xFF) << 48) @@ -1197,31 +1204,31 @@ | (prim_field_data[off] & 0xFF)); } - public float get (String name, float defvalue) + public float get(String name, float defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Float.TYPE); + ObjectStreamField field = getField(name, Float.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); - return Float.intBitsToFloat (((prim_field_data[off++] & 0xFF) << 24) - | ((prim_field_data[off++] & 0xFF) << 16) - | ((prim_field_data[off++] & 0xFF) << 8) - | (prim_field_data[off] & 0xFF)); + return Float.intBitsToFloat(((prim_field_data[off++] & 0xFF) << 24) + | ((prim_field_data[off++] & 0xFF) << 16) + | ((prim_field_data[off++] & 0xFF) << 8) + | (prim_field_data[off] & 0xFF)); } - public double get (String name, double defvalue) + public double get(String name, double defvalue) throws IOException, IllegalArgumentException { - ObjectStreamField field = getField (name, Double.TYPE); + ObjectStreamField field = getField(name, Double.TYPE); if (field == null) return defvalue; - int off = field.getOffset (); + int off = field.getOffset(); return Double.longBitsToDouble ( (long) (((prim_field_data[off++] & 0xFF) << 56) @@ -1234,22 +1241,22 @@ | (prim_field_data[off] & 0xFF))); } - public Object get (String name, Object defvalue) + public Object get(String name, Object defvalue) throws IOException, IllegalArgumentException { ObjectStreamField field = - getField (name, defvalue == null ? null : defvalue.getClass ()); + getField(name, defvalue == null ? null : defvalue.getClass ()); if (field == null) return defvalue; - return objs[field.getOffset ()]; + return objs[field.getOffset()]; } - private ObjectStreamField getField (String name, Class type) + private ObjectStreamField getField(String name, Class type) throws IllegalArgumentException { - ObjectStreamField field = clazz.getField (name); + ObjectStreamField field = clazz.getField(name); boolean illegal = false; try @@ -1300,7 +1307,7 @@ */ try { - Field f = clazz.forClass().getDeclaredField (name); + Field f = clazz.forClass().getDeclaredField(name); if (Modifier.isTransient(f.getModifiers())) throw new IllegalArgumentException ("no such field (non transient) " + name); @@ -1333,12 +1340,12 @@ * * @see #readObjectOverride() */ - protected ObjectInputStream () + protected ObjectInputStream() throws IOException, SecurityException { - SecurityManager sec_man = System.getSecurityManager (); + SecurityManager sec_man = System.getSecurityManager(); if (sec_man != null) - sec_man.checkPermission (SUBCLASS_IMPLEMENTATION_PERMISSION); + sec_man.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION); this.useSubclassMethod = true; } @@ -1351,10 +1358,10 @@ * * @see #ObjectInputStream() */ - protected Object readObjectOverride () + protected Object readObjectOverride() throws ClassNotFoundException, IOException, OptionalDataException { - throw new IOException ("Subclass of ObjectInputStream must implement readObjectOverride"); + throw new IOException("Subclass of ObjectInputStream must implement readObjectOverride"); } /** @@ -1363,14 +1370,14 @@ * @param obj The object for which we want a new handle. * @return A valid handle for the specified object. */ - private int assignNewHandle (Object obj) + private int assignNewHandle(Object obj) { - this.objectLookupTable.put (new Integer (this.nextOID), - new ObjectIdentityWrapper (obj)); + this.objectLookupTable.put(new Integer(this.nextOID), + new ObjectIdentityWrapper(obj)); return this.nextOID++; } - private Object processResolution (Object obj, int handle) + private Object processResolution(Object obj, int handle) throws IOException { if (obj instanceof Serializable) @@ -1380,7 +1387,7 @@ { Class classArgs[] = {}; m = getMethod(obj.getClass(), "readResolve", classArgs); - obj = m.invoke (obj, new Object[] {}); + obj = m.invoke(obj, new Object[] {}); } catch (NoSuchMethodException ignore) { @@ -1394,42 +1401,42 @@ } if (this.resolveEnabled) - obj = resolveObject (obj); + obj = resolveObject(obj); - this.objectLookupTable.put (new Integer (handle), - new ObjectIdentityWrapper (obj)); + this.objectLookupTable.put(new Integer(handle), + new ObjectIdentityWrapper(obj)); return obj; } - private void clearHandles () + private void clearHandles() { - this.objectLookupTable.clear (); + this.objectLookupTable.clear(); this.nextOID = baseWireHandle; } - private void readNextBlock () throws IOException + private void readNextBlock() throws IOException { - readNextBlock (this.realInputStream.readByte ()); + readNextBlock(this.realInputStream.readByte()); } - private void readNextBlock (byte marker) throws IOException + private void readNextBlock(byte marker) throws IOException { if (marker == TC_BLOCKDATA) { - dumpElement ("BLOCK DATA SIZE="); - this.blockDataBytes = this.realInputStream.readUnsignedByte (); + dumpElement("BLOCK DATA SIZE="); + this.blockDataBytes = this.realInputStream.readUnsignedByte(); dumpElementln (Integer.toString(this.blockDataBytes)); } else if (marker == TC_BLOCKDATALONG) { - dumpElement ("BLOCK DATA LONG SIZE="); - this.blockDataBytes = this.realInputStream.readInt (); + dumpElement("BLOCK DATA LONG SIZE="); + this.blockDataBytes = this.realInputStream.readInt(); dumpElementln (Integer.toString(this.blockDataBytes)); } else { - throw new EOFException ("Attempt to read primitive data, but no data block is active."); + throw new EOFException("Attempt to read primitive data, but no data block is active."); } if (this.blockData.length < this.blockDataBytes) @@ -1442,62 +1449,62 @@ private void readArrayElements (Object array, Class clazz) throws ClassNotFoundException, IOException { - if (clazz.isPrimitive ()) + if (clazz.isPrimitive()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readBoolean (); + cast_array[i] = this.realInputStream.readBoolean(); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readByte (); + cast_array[i] = this.realInputStream.readByte(); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readChar (); + cast_array[i] = this.realInputStream.readChar(); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readDouble (); + cast_array[i] = this.realInputStream.readDouble(); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readFloat (); + cast_array[i] = this.realInputStream.readFloat(); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readInt (); + cast_array[i] = this.realInputStream.readInt(); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readLong (); + cast_array[i] = this.realInputStream.readLong(); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = this.realInputStream.readShort (); + cast_array[i] = this.realInputStream.readShort(); return; } } @@ -1505,7 +1512,7 @@ { Object[] cast_array = (Object[])array; for (int i=0; i < cast_array.length; i++) - cast_array[i] = readObject (); + cast_array[i] = readObject(); } } @@ -1535,7 +1542,7 @@ else { stream_field = stream_fields[stream_idx]; - type = stream_field.getType (); + type = stream_field.getType(); } if (real_idx == real_fields.length) @@ -1543,8 +1550,8 @@ else { real_field = real_fields[real_idx]; - type = real_field.getType (); - field_name = real_field.getName (); + type = real_field.getType(); + field_name = real_field.getName(); } if (set_value && !default_initialize) @@ -1583,82 +1590,82 @@ if (type == Boolean.TYPE) { boolean value = - default_initialize ? false : this.realInputStream.readBoolean (); + default_initialize ? false : this.realInputStream.readBoolean(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setBooleanField (obj, stream_osc.forClass (), field_name, value); + setBooleanField(obj, stream_osc.forClass(), field_name, value); } else if (type == Byte.TYPE) { byte value = - default_initialize ? 0 : this.realInputStream.readByte (); + default_initialize ? 0 : this.realInputStream.readByte(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setByteField (obj, stream_osc.forClass (), field_name, value); + setByteField(obj, stream_osc.forClass(), field_name, value); } else if (type == Character.TYPE) { char value = - default_initialize ? (char)0 : this.realInputStream.readChar (); + default_initialize ? (char)0 : this.realInputStream.readChar(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setCharField (obj, stream_osc.forClass (), field_name, value); + setCharField(obj, stream_osc.forClass(), field_name, value); } else if (type == Double.TYPE) { double value = - default_initialize ? 0 : this.realInputStream.readDouble (); + default_initialize ? 0 : this.realInputStream.readDouble(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setDoubleField (obj, stream_osc.forClass (), field_name, value); + setDoubleField(obj, stream_osc.forClass(), field_name, value); } else if (type == Float.TYPE) { float value = - default_initialize ? 0 : this.realInputStream.readFloat (); + default_initialize ? 0 : this.realInputStream.readFloat(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setFloatField (obj, stream_osc.forClass (), field_name, value); + setFloatField(obj, stream_osc.forClass(), field_name, value); } else if (type == Integer.TYPE) { int value = - default_initialize ? 0 : this.realInputStream.readInt (); + default_initialize ? 0 : this.realInputStream.readInt(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setIntField (obj, stream_osc.forClass (), field_name, value); + setIntField(obj, stream_osc.forClass(), field_name, value); } else if (type == Long.TYPE) { long value = - default_initialize ? 0 : this.realInputStream.readLong (); + default_initialize ? 0 : this.realInputStream.readLong(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setLongField (obj, stream_osc.forClass (), field_name, value); + setLongField(obj, stream_osc.forClass(), field_name, value); } else if (type == Short.TYPE) { short value = - default_initialize ? (short)0 : this.realInputStream.readShort (); + default_initialize ? (short)0 : this.realInputStream.readShort(); if (!default_initialize && set_value) - dumpElementln (" " + field_name + ": " + value); + dumpElementln(" " + field_name + ": " + value); if (set_value) - setShortField (obj, stream_osc.forClass (), field_name, value); + setShortField(obj, stream_osc.forClass(), field_name, value); } else { Object value = - default_initialize ? null : readObject (); + default_initialize ? null : readObject(); if (set_value) - setObjectField (obj, stream_osc.forClass (), field_name, - real_field.getTypeString (), value); + setObjectField(obj, stream_osc.forClass(), field_name, + real_field.getTypeString(), value); } } catch (NoSuchFieldError e) @@ -1699,20 +1706,20 @@ // runs all registered ObjectInputValidations in prioritized order // on OBJ - private void invokeValidators () throws InvalidObjectException + private void invokeValidators() throws InvalidObjectException { - Object[] validators = new Object[this.validators.size ()]; + Object[] validators = new Object[this.validators.size()]; this.validators.copyInto (validators); Arrays.sort (validators); try { for (int i=0; i < validators.length; i++) - ((ObjectInputValidation)validators[i]).validateObject (); + ((ObjectInputValidation)validators[i]).validateObject(); } finally { - this.validators.removeAllElements (); + this.validators.removeAllElements(); } } @@ -1785,7 +1792,7 @@ Class classArgs[] = {ObjectInputStream.class}; Method m = getMethod (klass, "readObject", classArgs); Object args[] = {this}; - m.invoke (obj, args); + m.invoke(obj, args); } catch (NoSuchMethodException nsme) { @@ -1800,12 +1807,12 @@ if (exception instanceof IOException) throw (IOException) exception; - throw new IOException ("Exception thrown from readObject() on " + + throw new IOException("Exception thrown from readObject() on " + klass + ": " + exception.getClass().getName()); } catch (Exception x) { - throw new IOException ("Failure invoking readObject() on " + + throw new IOException("Failure invoking readObject() on " + klass + ": " + x.getClass().getName()); } @@ -1829,13 +1836,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setBooleanField (Object obj, Class klass, String field_name, + private void setBooleanField(Object obj, Class klass, String field_name, boolean val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setBoolean (obj, val); + Field f = getField(klass, field_name); + f.setBoolean(obj, val); } catch (IllegalArgumentException _) { @@ -1857,13 +1864,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setByteField (Object obj, Class klass, String field_name, + private void setByteField(Object obj, Class klass, String field_name, byte val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setByte (obj, val); + Field f = getField(klass, field_name); + f.setByte(obj, val); } catch (IllegalArgumentException _) { @@ -1885,13 +1892,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setCharField (Object obj, Class klass, String field_name, + private void setCharField(Object obj, Class klass, String field_name, char val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setChar (obj, val); + Field f = getField(klass, field_name); + f.setChar(obj, val); } catch (IllegalArgumentException _) { @@ -1913,13 +1920,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setDoubleField (Object obj, Class klass, String field_name, + private void setDoubleField(Object obj, Class klass, String field_name, double val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setDouble (obj, val); + Field f = getField(klass, field_name); + f.setDouble(obj, val); } catch (IllegalArgumentException _) { @@ -1941,13 +1948,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setFloatField (Object obj, Class klass, String field_name, + private void setFloatField(Object obj, Class klass, String field_name, float val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setFloat (obj, val); + Field f = getField(klass, field_name); + f.setFloat(obj, val); } catch (IllegalArgumentException _) { @@ -1969,13 +1976,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setIntField (Object obj, Class klass, String field_name, + private void setIntField(Object obj, Class klass, String field_name, int val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setInt (obj, val); + Field f = getField(klass, field_name); + f.setInt(obj, val); } catch (IllegalArgumentException _) { @@ -1997,13 +2004,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setLongField (Object obj, Class klass, String field_name, + private void setLongField(Object obj, Class klass, String field_name, long val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setLong (obj, val); + Field f = getField(klass, field_name); + f.setLong(obj, val); } catch (IllegalArgumentException _) { @@ -2025,13 +2032,13 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setShortField (Object obj, Class klass, String field_name, + private void setShortField(Object obj, Class klass, String field_name, short val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); - f.setShort (obj, val); + Field f = getField(klass, field_name); + f.setShort(obj, val); } catch (IllegalArgumentException _) { @@ -2053,25 +2060,26 @@ * @throws InvalidClassException if the specified field has not the required type. * @throws IOException if there is no field of that name in the specified class. */ - private void setObjectField (Object obj, Class klass, String field_name, + private void setObjectField(Object obj, Class klass, String field_name, String type_code, Object val) throws IOException, InvalidClassException { try { - Field f = getField (klass, field_name); + Field f = getField(klass, field_name); ObjectStreamField of = new ObjectStreamField(field_name, f.getType()); if (of.getTypeString() == null || !of.getTypeString().equals(type_code)) throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); - f.set (obj, val); + f.set(obj, val); } catch (InvalidClassException e) { throw e; } catch (Exception _) - {} + { + } } private static final int BUFFER_SIZE = 1024; Index: java/io/ObjectOutputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- java/io/ObjectOutputStream.java 28 Dec 2003 17:18:24 -0000 1.41 +++ java/io/ObjectOutputStream.java 28 Dec 2003 18:12:43 -0000 1.42 @@ -132,18 +132,18 @@ */ public ObjectOutputStream (OutputStream out) throws IOException { - realOutput = new DataOutputStream (out); + realOutput = new DataOutputStream(out); blockData = new byte[ BUFFER_SIZE ]; blockDataCount = 0; - blockDataOutput = new DataOutputStream (this); - setBlockDataMode (true); + blockDataOutput = new DataOutputStream(this); + setBlockDataMode(true); replacementEnabled = false; isSerializing = false; nextOID = baseWireHandle; - OIDLookupTable = new Hashtable (); + OIDLookupTable = new Hashtable(); protocolVersion = defaultProtocolVersion; useSubclassMethod = false; - writeStreamHeader (); + writeStreamHeader(); } /** @@ -168,16 +168,16 @@ * @exception IOException Exception from underlying * OutputStream. */ - public final void writeObject (Object obj) throws IOException + public final void writeObject(Object obj) throws IOException { if (useSubclassMethod) { - writeObjectOverride (obj); + writeObjectOverride(obj); return; } boolean was_serializing = isSerializing; - boolean old_mode = setBlockDataMode (false); + boolean old_mode = setBlockDataMode(false); try { isSerializing = true; @@ -188,49 +188,49 @@ { if (obj == null) { - realOutput.writeByte (TC_NULL); + realOutput.writeByte(TC_NULL); break; } - Integer handle = findHandle (obj); + Integer handle = findHandle(obj); if (handle != null) { - realOutput.writeByte (TC_REFERENCE); - realOutput.writeInt (handle.intValue ()); + realOutput.writeByte(TC_REFERENCE); + realOutput.writeInt(handle.intValue()); break; } if (obj instanceof Class) { Class cl = (Class)obj; - ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject (cl); - assignNewHandle (obj); - realOutput.writeByte (TC_CLASS); + ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject(cl); + assignNewHandle(obj); + realOutput.writeByte(TC_CLASS); if (!osc.isProxyClass) { writeObject (osc); } else { - realOutput.writeByte (TC_PROXYCLASSDESC); + realOutput.writeByte(TC_PROXYCLASSDESC); Class[] intfs = cl.getInterfaces(); realOutput.writeInt(intfs.length); for (int i = 0; i < intfs.length; i++) realOutput.writeUTF(intfs[i].getName()); - boolean oldmode = setBlockDataMode (true); + boolean oldmode = setBlockDataMode(true); annotateProxyClass(cl); - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); realOutput.writeByte(TC_ENDBLOCKDATA); - writeObject (osc.getSuper()); + writeObject(osc.getSuper()); } break; } if (obj instanceof ObjectStreamClass) { - writeClassDescriptor ((ObjectStreamClass) obj); + writeClassDescriptor((ObjectStreamClass) obj); break; } @@ -238,7 +238,7 @@ && ! replaceDone) { replacedObject = obj; - + if (obj instanceof Serializable) { Method m = null; @@ -250,7 +250,7 @@ // m can't be null by definition since an // exception would have been thrown so a check // for null is not needed. - obj = m.invoke (obj, new Object[] {}); + obj = m.invoke(obj, new Object[] {}); } catch (NoSuchMethodException ignore) { @@ -262,55 +262,55 @@ { } } - + if (replacementEnabled) - obj = replaceObject (obj); - + obj = replaceObject(obj); + replaceDone = true; continue; } if (obj instanceof String) { - realOutput.writeByte (TC_STRING); - assignNewHandle (obj); - realOutput.writeUTF ((String)obj); + realOutput.writeByte(TC_STRING); + assignNewHandle(obj); + realOutput.writeUTF((String)obj); break; } - Class clazz = obj.getClass (); - ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject (clazz); + Class clazz = obj.getClass(); + ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject(clazz); if (osc == null) - throw new NotSerializableException (clazz.getName ()); + throw new NotSerializableException(clazz.getName()); if (clazz.isArray ()) { - realOutput.writeByte (TC_ARRAY); - writeObject (osc); - assignNewHandle (obj); - writeArraySizeAndElements (obj, clazz.getComponentType ()); + realOutput.writeByte(TC_ARRAY); + writeObject(osc); + assignNewHandle(obj); + writeArraySizeAndElements(obj, clazz.getComponentType()); break; } - - realOutput.writeByte (TC_OBJECT); - writeObject (osc); + + realOutput.writeByte(TC_OBJECT); + writeObject(osc); if (replaceDone) - assignNewHandle (replacedObject); + assignNewHandle(replacedObject); else - assignNewHandle (obj); + assignNewHandle(obj); if (obj instanceof Externalizable) { if (protocolVersion == PROTOCOL_VERSION_2) - setBlockDataMode (true); + setBlockDataMode(true); - ((Externalizable)obj).writeExternal (this); + ((Externalizable)obj).writeExternal(this); if (protocolVersion == PROTOCOL_VERSION_2) { - setBlockDataMode (false); - realOutput.writeByte (TC_ENDBLOCKDATA); + setBlockDataMode(false); + realOutput.writeByte(TC_ENDBLOCKDATA); } break; @@ -320,22 +320,22 @@ { currentObject = obj; ObjectStreamClass[] hierarchy = - ObjectStreamClass.getObjectStreamClasses (clazz); + ObjectStreamClass.getObjectStreamClasses(clazz); - for (int i=0; i < hierarchy.length; i++) + for (int i = 0; i < hierarchy.length; i++) { currentObjectStreamClass = hierarchy[i]; fieldsAlreadyWritten = false; - if (currentObjectStreamClass.hasWriteMethod ()) + if (currentObjectStreamClass.hasWriteMethod()) { - setBlockDataMode (true); - callWriteMethod (obj, currentObjectStreamClass); - setBlockDataMode (false); - realOutput.writeByte (TC_ENDBLOCKDATA); + setBlockDataMode(true); + callWriteMethod(obj, currentObjectStreamClass); + setBlockDataMode(false); + realOutput.writeByte(TC_ENDBLOCKDATA); } else - writeFields (obj, currentObjectStreamClass); + writeFields(obj, currentObjectStreamClass); } currentObject = null; @@ -344,7 +344,7 @@ break; } - throw new NotSerializableException (clazz.getName ()); + throw new NotSerializableException(clazz.getName ()); } // end pseudo-loop } catch (ObjectStreamException ose) @@ -354,17 +354,18 @@ } catch (IOException e) { - realOutput.writeByte (TC_EXCEPTION); - reset (true); + realOutput.writeByte(TC_EXCEPTION); + reset(true); - setBlockDataMode (false); + setBlockDataMode(false); try { - writeObject (e); + writeObject(e); } catch (IOException ioe) { - throw new StreamCorruptedException ("Exception " + ioe + " thrown while exception was being written to stream."); + throw new StreamCorruptedException + ("Exception " + ioe + " thrown while exception was being written to stream."); } reset (true); @@ -373,224 +374,227 @@ finally { isSerializing = was_serializing; - setBlockDataMode (old_mode); + setBlockDataMode(old_mode); } } - protected void writeClassDescriptor (ObjectStreamClass osc) throws IOException + protected void writeClassDescriptor(ObjectStreamClass osc) throws IOException { - realOutput.writeByte (TC_CLASSDESC); - realOutput.writeUTF (osc.getName ()); - realOutput.writeLong (osc.getSerialVersionUID ()); - assignNewHandle (osc); + realOutput.writeByte(TC_CLASSDESC); + realOutput.writeUTF(osc.getName()); + realOutput.writeLong(osc.getSerialVersionUID()); + assignNewHandle(osc); - int flags = osc.getFlags (); + int flags = osc.getFlags(); if (protocolVersion == PROTOCOL_VERSION_2 - && osc.isExternalizable ()) + && osc.isExternalizable()) flags |= SC_BLOCK_DATA; - realOutput.writeByte (flags); + realOutput.writeByte(flags); ObjectStreamField[] fields = osc.fields; - realOutput.writeShort (fields.length); + realOutput.writeShort(fields.length); ObjectStreamField field; - for (int i=0; i < fields.length; i++) + for (int i = 0; i < fields.length; i++) { field = fields[i]; - realOutput.writeByte (field.getTypeCode ()); - realOutput.writeUTF (field.getName ()); + realOutput.writeByte(field.getTypeCode ()); + realOutput.writeUTF(field.getName ()); - if (! field.isPrimitive ()) - writeObject (field.getTypeString ()); + if (! field.isPrimitive()) + writeObject(field.getTypeString()); } - boolean oldmode = setBlockDataMode (true); - annotateClass (osc.forClass ()); - setBlockDataMode (oldmode); - realOutput.writeByte (TC_ENDBLOCKDATA); + boolean oldmode = setBlockDataMode(true); + annotateClass(osc.forClass()); + setBlockDataMode(oldmode); + realOutput.writeByte(TC_ENDBLOCKDATA); - if (osc.isSerializable () || osc.isExternalizable()) - writeObject (osc.getSuper ()); + if (osc.isSerializable() || osc.isExternalizable()) + writeObject(osc.getSuper()); else - writeObject (null); + writeObject(null); } /** - Writes the current objects non-transient, non-static fields from - the current class to the underlying output stream. - - This method is intended to be called from within a object's - private void writeObject (ObjectOutputStream) - method. - - @exception NotActiveException This method was called from a - context other than from the current object's and current class's - private void writeObject (ObjectOutputStream) - method. - - @exception IOException Exception from underlying - OutputStream. - */ - public void defaultWriteObject () + * Writes the current objects non-transient, non-static fields from + * the current class to the underlying output stream. + * + * This method is intended to be called from within a object's + * private void writeObject (ObjectOutputStream) + * method. + * + * @exception NotActiveException This method was called from a + * context other than from the current object's and current class's + * private void writeObject (ObjectOutputStream) + * method. + * + * @exception IOException Exception from underlying + * OutputStream. + */ + public void defaultWriteObject() throws IOException, NotActiveException { - markFieldsWritten (); - writeFields (currentObject, currentObjectStreamClass); + markFieldsWritten(); + writeFields(currentObject, currentObjectStreamClass); } - private void markFieldsWritten () throws IOException + private void markFieldsWritten() throws IOException { if (currentObject == null || currentObjectStreamClass == null) - throw new NotActiveException ("defaultWriteObject called by non-active class and/or object"); + throw new NotActiveException + ("defaultWriteObject called by non-active class and/or object"); if (fieldsAlreadyWritten) - throw new IOException ("Only one of putFields and defaultWriteObject may be called, and it may only be called once"); + throw new IOException + ("Only one of putFields and defaultWriteObject may be called, and it may only be called once"); fieldsAlreadyWritten = true; } - /** - Resets stream to state equivalent to the state just after it was - constructed. - - Causes all objects previously written to the stream to be - forgotten. A notification of this reset is also written to the - underlying stream. - - @exception IOException Exception from underlying - OutputStream or reset called while serialization is - in progress. - */ - public void reset () throws IOException + * Resets stream to state equivalent to the state just after it was + * constructed. + * + * Causes all objects previously written to the stream to be + * forgotten. A notification of this reset is also written to the + * underlying stream. + * + * @exception IOException Exception from underlying + * OutputStream or reset called while serialization is + * in progress. + */ + public void reset() throws IOException { - reset (false); + reset(false); } - private void reset (boolean internal) throws IOException + private void reset(boolean internal) throws IOException { if (!internal) { if (isSerializing) - throw new IOException ("Reset called while serialization in progress"); + throw new IOException("Reset called while serialization in progress"); - realOutput.writeByte (TC_RESET); + realOutput.writeByte(TC_RESET); } - - clearHandles (); + + clearHandles(); } /** - Informs this ObjectOutputStream to write data - according to the specified protocol. There are currently two - different protocols, specified by PROTOCOL_VERSION_1 - and PROTOCOL_VERSION_2. This implementation writes - data using PROTOCOL_VERSION_2 by default, as is done - by the JDK 1.2. - - A non-portable method, setDefaultProtocolVersion (int - version) is provided to change the default protocol - version. - - For an explination of the differences beween the two protocols - see XXX: the Java ObjectSerialization Specification. - - @exception IOException if version is not a valid - protocol - - @see #setDefaultProtocolVersion(int) - */ - public void useProtocolVersion (int version) throws IOException + * Informs this ObjectOutputStream to write data + * according to the specified protocol. There are currently two + * different protocols, specified by PROTOCOL_VERSION_1 + * and PROTOCOL_VERSION_2. This implementation writes + * data using PROTOCOL_VERSION_2 by default, as is done + * by the JDK 1.2. + * + * A non-portable method, setDefaultProtocolVersion (int + * version) is provided to change the default protocol + * version. + * + * For an explination of the differences beween the two protocols + * see XXX: the Java ObjectSerialization Specification. + * + * @exception IOException if version is not a valid + * protocol + * + * @see #setDefaultProtocolVersion(int) + */ + public void useProtocolVersion(int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) - throw new IOException ("Invalid protocol version requested."); + throw new IOException("Invalid protocol version requested."); protocolVersion = version; } /** - GNU $classpath specific - - Changes the default stream protocol used by all - ObjectOutputStreams. There are currently two - different protocols, specified by PROTOCOL_VERSION_1 - and PROTOCOL_VERSION_2. The default default is - PROTOCOL_VERSION_1. - - @exception IOException if version is not a valid - protocol - - @see #useProtocolVersion(int) - */ - public static void setDefaultProtocolVersion (int version) + * GNU $classpath specific + * + * Changes the default stream protocol used by all + * ObjectOutputStreams. There are currently two + * different protocols, specified by PROTOCOL_VERSION_1 + * and PROTOCOL_VERSION_2. The default default is + * PROTOCOL_VERSION_1. + * + * @exception IOException if version is not a valid + * protocol + * + * @see #useProtocolVersion(int) + */ + public static void setDefaultProtocolVersion(int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) - throw new IOException ("Invalid protocol version requested."); + throw new IOException("Invalid protocol version requested."); defaultProtocolVersion = version; } /** - An empty hook that allows subclasses to write extra information - about classes to the stream. This method is called the first - time each class is seen, and after all of the standard - information about the class has been written. - - @exception IOException Exception from underlying - OutputStream. - - @see ObjectInputStream#resolveClass(java.io.ObjectStreamClass) - */ - protected void annotateClass (Class cl) throws IOException - {} + * An empty hook that allows subclasses to write extra information + * about classes to the stream. This method is called the first + * time each class is seen, and after all of the standard + * information about the class has been written. + * + * @exception IOException Exception from underlying + * OutputStream. + * + * @see ObjectInputStream#resolveClass(java.io.ObjectStreamClass) + */ + protected void annotateClass(Class cl) throws IOException + { + } protected void annotateProxyClass(Class cl) throws IOException - {} + { + } /** - Allows subclasses to replace objects that are written to the - stream with other objects to be written in their place. This - method is called the first time each object is encountered - (modulo reseting of the stream). - - This method must be enabled before it will be called in the - serialization process. - - @exception IOException Exception from underlying - OutputStream. - - @see #enableReplaceObject(boolean) - */ - protected Object replaceObject (Object obj) throws IOException + * Allows subclasses to replace objects that are written to the + * stream with other objects to be written in their place. This + * method is called the first time each object is encountered + * (modulo reseting of the stream). + * + * This method must be enabled before it will be called in the + * serialization process. + * + * @exception IOException Exception from underlying + * OutputStream. + * + * @see #enableReplaceObject(boolean) + */ + protected Object replaceObject(Object obj) throws IOException { return obj; } /** - If enable is true and this object is - trusted, then replaceObject (Object) will be called - in subsequent calls to writeObject (Object). - Otherwise, replaceObject (Object) will not be called. - - @exception SecurityException This class is not trusted. - */ - protected boolean enableReplaceObject (boolean enable) + * If enable is true and this object is + * trusted, then replaceObject (Object) will be called + * in subsequent calls to writeObject (Object). + * Otherwise, replaceObject (Object) will not be called. + * + * @exception SecurityException This class is not trusted. + */ + protected boolean enableReplaceObject(boolean enable) throws SecurityException { if (enable) { - SecurityManager sm = System.getSecurityManager (); + SecurityManager sm = System.getSecurityManager(); if (sm != null) - sm.checkPermission (new SerializablePermission ("enableSubstitution")); + sm.checkPermission(new SerializablePermission("enableSubstitution")); } boolean old_val = replacementEnabled; @@ -600,20 +604,18 @@ /** - Writes stream magic and stream version information to the - underlying stream. - - @exception IOException Exception from underlying - OutputStream. - */ - protected void writeStreamHeader () throws IOException + * Writes stream magic and stream version information to the + * underlying stream. + * + * @exception IOException Exception from underlying + * OutputStream. + */ + protected void writeStreamHeader() throws IOException { - realOutput.writeShort (STREAM_MAGIC); - realOutput.writeShort (STREAM_VERSION); + realOutput.writeShort(STREAM_MAGIC); + realOutput.writeShort(STREAM_VERSION); } - - /** * Protected constructor that allows subclasses to override * serialization. This constructor should be called by subclasses @@ -625,11 +627,11 @@ * * @see #writeObjectOverride(Object) */ - protected ObjectOutputStream () throws IOException, SecurityException + protected ObjectOutputStream() throws IOException, SecurityException { SecurityManager sec_man = System.getSecurityManager (); if (sec_man != null) - sec_man.checkPermission (SUBCLASS_IMPLEMENTATION_PERMISSION); + sec_man.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION); useSubclassMethod = true; } @@ -646,10 +648,11 @@ * @exception NotActiveException Subclass has arranged for this * method to be called, but did not implement this method. */ - protected void writeObjectOverride (Object obj) throws NotActiveException, + protected void writeObjectOverride(Object obj) throws NotActiveException, IOException { - throw new NotActiveException ("Subclass of ObjectOutputStream must implement writeObjectOverride"); + throw new NotActiveException + ("Subclass of ObjectOutputStream must implement writeObjectOverride"); } @@ -661,48 +664,48 @@ if (writeDataAsBlocks) { if (blockDataCount == BUFFER_SIZE) - drain (); + drain(); blockData[ blockDataCount++ ] = (byte)data; } else - realOutput.write (data); + realOutput.write(data); } /** * @see DataOutputStream#write(byte[]) */ - public void write (byte[] b) throws IOException + public void write(byte[] b) throws IOException { - write (b, 0, b.length); + write(b, 0, b.length); } /** * @see DataOutputStream#write(byte[],int,int) */ - public void write (byte[] b, int off, int len) throws IOException + public void write(byte[] b, int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) - throw new IndexOutOfBoundsException (); + throw new IndexOutOfBoundsException(); if (blockDataCount + len < BUFFER_SIZE) { - System.arraycopy (b, off, blockData, blockDataCount, len); + System.arraycopy(b, off, blockData, blockDataCount, len); blockDataCount += len; } else { - drain (); - writeBlockDataHeader (len); - realOutput.write (b, off, len); + drain(); + writeBlockDataHeader(len); + realOutput.write(b, off, len); } } else - realOutput.write (b, off, len); + realOutput.write(b, off, len); } @@ -711,8 +714,8 @@ */ public void flush () throws IOException { - drain (); - realOutput.flush (); + drain(); + realOutput.flush(); } @@ -723,14 +726,14 @@ * @exception IOException Exception from underlying * OutputStream. */ - protected void drain () throws IOException + protected void drain() throws IOException { if (blockDataCount == 0) return; if (writeDataAsBlocks) - writeBlockDataHeader (blockDataCount); - realOutput.write (blockData, 0, blockDataCount); + writeBlockDataHeader(blockDataCount); + realOutput.write(blockData, 0, blockDataCount); blockDataCount = 0; } @@ -738,28 +741,28 @@ /** * @see java.io.DataOutputStream#close () */ - public void close () throws IOException + public void close() throws IOException { - flush (); - realOutput.close (); + flush(); + realOutput.close(); } /** * @see java.io.DataOutputStream#writeBoolean (boolean) */ - public void writeBoolean (boolean data) throws IOException + public void writeBoolean(boolean data) throws IOException { - blockDataOutput.writeBoolean (data); + blockDataOutput.writeBoolean(data); } /** * @see java.io.DataOutputStream#writeByte (int) */ - public void writeByte (int data) throws IOException + public void writeByte(int data) throws IOException { - blockDataOutput.writeByte (data); + blockDataOutput.writeByte(data); } @@ -768,79 +771,79 @@ */ public void writeShort (int data) throws IOException { - blockDataOutput.writeShort (data); + blockDataOutput.writeShort(data); } /** * @see java.io.DataOutputStream#writeChar (int) */ - public void writeChar (int data) throws IOException + public void writeChar(int data) throws IOException { - blockDataOutput.writeChar (data); + blockDataOutput.writeChar(data); } /** * @see java.io.DataOutputStream#writeInt (int) */ - public void writeInt (int data) throws IOException + public void writeInt(int data) throws IOException { - blockDataOutput.writeInt (data); + blockDataOutput.writeInt(data); } /** * @see java.io.DataOutputStream#writeLong (long) */ - public void writeLong (long data) throws IOException + public void writeLong(long data) throws IOException { - blockDataOutput.writeLong (data); + blockDataOutput.writeLong(data); } /** * @see java.io.DataOutputStream#writeFloat (float) */ - public void writeFloat (float data) throws IOException + public void writeFloat(float data) throws IOException { - blockDataOutput.writeFloat (data); + blockDataOutput.writeFloat(data); } /** * @see java.io.DataOutputStream#writeDouble (double) */ - public void writeDouble (double data) throws IOException + public void writeDouble(double data) throws IOException { - blockDataOutput.writeDouble (data); + blockDataOutput.writeDouble(data); } /** * @see java.io.DataOutputStream#writeBytes (java.lang.String) */ - public void writeBytes (String data) throws IOException + public void writeBytes(String data) throws IOException { - blockDataOutput.writeBytes (data); + blockDataOutput.writeBytes(data); } /** * @see java.io.DataOutputStream#writeChars (java.lang.String) */ - public void writeChars (String data) throws IOException + public void writeChars(String data) throws IOException { - dataOutput.writeChars (data); + dataOutput.writeChars(data); } /** * @see java.io.DataOutputStream#writeUTF (java.lang.String) */ - public void writeUTF (String data) throws IOException + public void writeUTF(String data) throws IOException { - dataOutput.writeUTF (data); + dataOutput.writeUTF(data); } @@ -868,14 +871,14 @@ public abstract void write (ObjectOutput out) throws IOException; } - public PutField putFields () throws IOException + public PutField putFields() throws IOException { if (currentPutField != null) return currentPutField; - markFieldsWritten (); + markFieldsWritten(); - currentPutField = new PutField () + currentPutField = new PutField() { private byte[] prim_field_data = new byte[currentObjectStreamClass.primFieldSize]; @@ -885,46 +888,46 @@ private ObjectStreamField getField (String name) { ObjectStreamField field - = currentObjectStreamClass.getField (name); + = currentObjectStreamClass.getField(name); if (field == null) throw new IllegalArgumentException("no such serializable field " + name); return field; } - - public void put (String name, boolean value) + + public void put(String name, boolean value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'Z'); + checkType(field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } - public void put (String name, byte value) + public void put(String name, byte value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'B'); - prim_field_data[field.getOffset ()] = value; + checkType(field, 'B'); + prim_field_data[field.getOffset()] = value; } - public void put (String name, char value) + public void put(String name, char value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'C'); - int off = field.getOffset (); + checkType(field, 'C'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } - public void put (String name, double value) + public void put(String name, double value) { ObjectStreamField field = getField (name); - checkType (field, 'D'); - int off = field.getOffset (); + checkType(field, 'D'); + int off = field.getOffset(); long l_value = Double.doubleToLongBits (value); prim_field_data[off++] = (byte)(l_value >>> 52); prim_field_data[off++] = (byte)(l_value >>> 48); @@ -936,35 +939,35 @@ prim_field_data[off] = (byte)l_value; } - public void put (String name, float value) + public void put(String name, float value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); - checkType (field, 'F'); - int off = field.getOffset (); - int i_value = Float.floatToIntBits (value); + checkType(field, 'F'); + int off = field.getOffset(); + int i_value = Float.floatToIntBits(value); prim_field_data[off++] = (byte)(i_value >>> 24); prim_field_data[off++] = (byte)(i_value >>> 16); prim_field_data[off++] = (byte)(i_value >>> 8); prim_field_data[off] = (byte)i_value; } - public void put (String name, int value) + public void put(String name, int value) { - ObjectStreamField field = getField (name); - checkType (field, 'I'); - int off = field.getOffset (); + ObjectStreamField field = getField(name); + checkType(field, 'I'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 24); prim_field_data[off++] = (byte)(value >>> 16); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } - public void put (String name, long value) + public void put(String name, long value) { - ObjectStreamField field = getField (name); - checkType (field, 'J'); - int off = field.getOffset (); + ObjectStreamField field = getField(name); + checkType(field, 'J'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 52); prim_field_data[off++] = (byte)(value >>> 48); prim_field_data[off++] = (byte)(value >>> 40); @@ -975,44 +978,44 @@ prim_field_data[off] = (byte)value; } - public void put (String name, short value) + public void put(String name, short value) { - ObjectStreamField field = getField (name); - checkType (field, 'S'); - int off = field.getOffset (); + ObjectStreamField field = getField(name); + checkType(field, 'S'); + int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } - public void put (String name, Object value) + public void put(String name, Object value) { - ObjectStreamField field = getField (name); + ObjectStreamField field = getField(name); if (value != null && - ! field.getType ().isAssignableFrom (value.getClass ())) - throw new IllegalArgumentException ("Class " + value.getClass() + - " cannot be cast to " + field.getType()); - objs[field.getOffset ()] = value; + ! field.getType().isAssignableFrom(value.getClass ())) + throw new IllegalArgumentException("Class " + value.getClass() + + " cannot be cast to " + field.getType()); + objs[field.getOffset()] = value; } - public void write (ObjectOutput out) throws IOException + public void write(ObjectOutput out) throws IOException { // Apparently Block data is not used with PutField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. - boolean oldmode = setBlockDataMode (false); - out.write (prim_field_data); + boolean oldmode = setBlockDataMode(false); + out.write(prim_field_data); for (int i = 0; i < objs.length; ++ i) - out.writeObject (objs[i]); - setBlockDataMode (oldmode); + out.writeObject(objs[i]); + setBlockDataMode(oldmode); } - private void checkType (ObjectStreamField field, char type) + private void checkType(ObjectStreamField field, char type) throws IllegalArgumentException { - if (TypeSignature.getEncodingOfClass (field.getType ()).charAt (0) + if (TypeSignature.getEncodingOfClass(field.getType()).charAt(0) != type) - throw new IllegalArgumentException (); + throw new IllegalArgumentException(); } }; // end PutFieldImpl @@ -1021,179 +1024,180 @@ } - public void writeFields () throws IOException + public void writeFields() throws IOException { if (currentPutField == null) - throw new NotActiveException ("writeFields can only be called after putFields has been called"); + throw new NotActiveException("writeFields can only be called after putFields has been called"); - currentPutField.write (this); + currentPutField.write(this); } // write out the block-data buffer, picking the correct header // depending on the size of the buffer - private void writeBlockDataHeader (int size) throws IOException + private void writeBlockDataHeader(int size) throws IOException { if (size < 256) { - realOutput.writeByte (TC_BLOCKDATA); - realOutput.write (size); + realOutput.writeByte(TC_BLOCKDATA); + realOutput.write(size); } else { - realOutput.writeByte (TC_BLOCKDATALONG); - realOutput.writeInt (size); + realOutput.writeByte(TC_BLOCKDATALONG); + realOutput.writeInt(size); } } // lookup the handle for OBJ, return null if OBJ doesn't have a // handle yet - private Integer findHandle (Object obj) + private Integer findHandle(Object obj) { - return (Integer)OIDLookupTable.get (new ObjectIdentityWrapper (obj)); + return (Integer)OIDLookupTable.get(new ObjectIdentityWrapper(obj)); } // assigns the next availible handle to OBJ - private int assignNewHandle (Object obj) + private int assignNewHandle(Object obj) { - OIDLookupTable.put (new ObjectIdentityWrapper (obj), - new Integer (nextOID)); + OIDLookupTable.put(new ObjectIdentityWrapper(obj), + new Integer(nextOID)); return nextOID++; } // resets mapping from objects to handles - private void clearHandles () + private void clearHandles() { nextOID = baseWireHandle; - OIDLookupTable.clear (); + OIDLookupTable.clear(); } // write out array size followed by each element of the array - private void writeArraySizeAndElements (Object array, Class clazz) + private void writeArraySizeAndElements(Object array, Class clazz) throws IOException { - int length = Array.getLength (array); + int length = Array.getLength(array); - if (clazz.isPrimitive ()) + if (clazz.isPrimitive()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeBoolean (cast_array[i]); + for (int i = 0; i < length; i++) + realOutput.writeBoolean(cast_array[i]); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; - realOutput.writeInt (length); + realOutput.writeInt(length); realOutput.write(cast_array, 0, length); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeChar (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeChar(cast_array[i]); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeDouble (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeDouble(cast_array[i]); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeFloat (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeFloat(cast_array[i]); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeInt (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + realOutput.writeInt(cast_array[i]); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeLong (cast_array[i]); + for (int i = 0; i < length; i++) + realOutput.writeLong(cast_array[i]); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; realOutput.writeInt (length); - for (int i=0; i < length; i++) - realOutput.writeShort (cast_array[i]); + for (int i = 0; i < length; i++) + realOutput.writeShort(cast_array[i]); return; } } else { Object[] cast_array = (Object[])array; - realOutput.writeInt (length); - for (int i=0; i < length; i++) - writeObject (cast_array[i]); + realOutput.writeInt(length); + for (int i = 0; i < length; i++) + writeObject(cast_array[i]); } } // writes out FIELDS of OBJECT for the specified ObjectStreamClass. // FIELDS are already in canonical order. - private void writeFields (Object obj, ObjectStreamClass osc) + private void writeFields(Object obj, ObjectStreamClass osc) throws IOException { ObjectStreamField[] fields = osc.fields; - boolean oldmode = setBlockDataMode (false); + boolean oldmode = setBlockDataMode(false); String field_name; Class type; - for (int i=0; i < fields.length; i++) + + for (int i = 0; i < fields.length; i++) { - field_name = fields[i].getName (); - type = fields[i].getType (); + field_name = fields[i].getName(); + type = fields[i].getType(); if (type == Boolean.TYPE) - realOutput.writeBoolean (getBooleanField (obj, osc.forClass(), field_name)); + realOutput.writeBoolean(getBooleanField(obj, osc.forClass(), field_name)); else if (type == Byte.TYPE) - realOutput.writeByte (getByteField (obj, osc.forClass(), field_name)); + realOutput.writeByte(getByteField(obj, osc.forClass(), field_name)); else if (type == Character.TYPE) - realOutput.writeChar (getCharField (obj, osc.forClass(), field_name)); + realOutput.writeChar(getCharField(obj, osc.forClass(), field_name)); else if (type == Double.TYPE) - realOutput.writeDouble (getDoubleField (obj, osc.forClass(), field_name)); + realOutput.writeDouble(getDoubleField(obj, osc.forClass(), field_name)); else if (type == Float.TYPE) - realOutput.writeFloat (getFloatField (obj, osc.forClass(), field_name)); + realOutput.writeFloat(getFloatField(obj, osc.forClass(), field_name)); else if (type == Integer.TYPE) - realOutput.writeInt (getIntField (obj, osc.forClass(), field_name)); + realOutput.writeInt(getIntField(obj, osc.forClass(), field_name)); else if (type == Long.TYPE) - realOutput.writeLong (getLongField (obj, osc.forClass(), field_name)); + realOutput.writeLong(getLongField(obj, osc.forClass(), field_name)); else if (type == Short.TYPE) - realOutput.writeShort (getShortField (obj, osc.forClass(), field_name)); + realOutput.writeShort(getShortField(obj, osc.forClass(), field_name)); else - writeObject (getObjectField (obj, osc.forClass(), field_name, - fields[i].getTypeString ())); + writeObject(getObjectField(obj, osc.forClass(), field_name, + fields[i].getTypeString ())); } - setBlockDataMode (oldmode); + setBlockDataMode(oldmode); } // Toggles writing primitive data to block-data buffer. - private boolean setBlockDataMode (boolean on) throws IOException + private boolean setBlockDataMode(boolean on) throws IOException { if (on == writeDataAsBlocks) return on; @@ -1211,7 +1215,7 @@ } - private void callWriteMethod (Object obj, ObjectStreamClass osc) + private void callWriteMethod(Object obj, ObjectStreamClass osc) throws IOException { Class klass = osc.forClass(); @@ -1219,9 +1223,9 @@ try { Class classArgs[] = {ObjectOutputStream.class}; - Method m = getMethod (klass, "writeObject", classArgs); + Method m = getMethod(klass, "writeObject", classArgs); Object args[] = {this}; - m.invoke (obj, args); + m.invoke(obj, args); } catch (NoSuchMethodException nsme) { @@ -1237,33 +1241,34 @@ throw (IOException) exception; IOException ioe - = new IOException ("Exception thrown from writeObject() on " + - klass + ": " + exception.getClass().getName()); + = new IOException("Exception thrown from writeObject() on " + + klass + ": " + exception.getClass().getName()); ioe.initCause(exception); throw ioe; } catch (Exception x) { IOException ioe - = new IOException ("Failure invoking writeObject() on " + - klass + ": " + x.getClass().getName()); + = new IOException("Failure invoking writeObject() on " + + klass + ": " + x.getClass().getName()); ioe.initCause(x); throw ioe; } } - private boolean getBooleanField (Object obj, Class klass, String field_name) + private boolean getBooleanField(Object obj, Class klass, String field_name) throws IOException { try { - Field f = getField (klass, field_name); - boolean b = f.getBoolean (obj); + Field f = getField(klass, field_name); + boolean b = f.getBoolean(obj); return b; } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1271,7 +1276,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1286,7 +1291,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1294,7 +1300,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1309,7 +1315,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1317,7 +1324,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1332,7 +1339,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1340,7 +1348,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1355,7 +1363,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1363,8 +1372,8 @@ } catch (Exception _) { - throw new IOException (); - } + throw new IOException("Unexpected exception " + _); + } } private int getIntField (Object obj, Class klass, String field_name) @@ -1378,7 +1387,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1386,8 +1396,8 @@ } catch (Exception _) { - throw new IOException (); - } + throw new IOException("Unexpected exception " + _); + } } private long getLongField (Object obj, Class klass, String field_name) @@ -1401,7 +1411,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1409,7 +1420,7 @@ } catch (Exception _) { - throw new IOException (); + throw new IOException("Unexpected exception " + _); } } @@ -1424,7 +1435,8 @@ } catch (IllegalArgumentException _) { - throw new InvalidClassException("invalid requested type for field " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); } catch (IOException e) { @@ -1432,8 +1444,8 @@ } catch (Exception _) { - throw new IOException (); - } + throw new IOException("Unexpected exception " + _); + } } private Object getObjectField (Object obj, Class klass, String field_name, @@ -1446,7 +1458,8 @@ if (of.getTypeString() == null || !of.getTypeString().equals(type_code)) - throw new InvalidClassException("invalid type code for " + field_name + " in class " + klass.getName()); + throw new InvalidClassException + ("invalid type code for " + field_name + " in class " + klass.getName()); Object o = f.get (obj); // FIXME: We should check the type_code here @@ -1480,7 +1493,8 @@ } catch (java.lang.NoSuchFieldException e) { - throw new InvalidClassException ("no field called " + name + " in class " + klass.getName()); + throw new InvalidClassException + ("no field called " + name + " in class " + klass.getName()); } } @@ -1525,7 +1539,7 @@ { if (Configuration.INIT_LOAD_LIBRARY) { - System.loadLibrary ("javaio"); + System.loadLibrary("javaio"); } } } Index: java/io/ObjectStreamClass.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamClass.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- java/io/ObjectStreamClass.java 28 Dec 2003 17:18:24 -0000 1.26 +++ java/io/ObjectStreamClass.java 28 Dec 2003 18:12:43 -0000 1.27 @@ -2,39 +2,39 @@ about serialized objects. Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. -This file is part of GNU Classpath. + This file is part of GNU Classpath. -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -02111-1307 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ package java.io; @@ -61,23 +61,23 @@ public class ObjectStreamClass implements Serializable { /** - Returns the ObjectStreamClass for cl. - If cl is null, or is not Serializable, - null is returned. ObjectStreamClass's are memorized; - later calls to this method with the same class will return the - same ObjectStreamClass object and no recalculation - will be done. - - @see java.io.Serializable - */ - public static ObjectStreamClass lookup (Class cl) + * Returns the ObjectStreamClass for cl. + * If cl is null, or is not Serializable, + * null is returned. ObjectStreamClass's are memorized; + * later calls to this method with the same class will return the + * same ObjectStreamClass object and no recalculation + * will be done. + * + * @see java.io.Serializable + */ + public static ObjectStreamClass lookup(Class cl) { if (cl == null) return null; - if (! (Serializable.class).isAssignableFrom (cl)) + if (! (Serializable.class).isAssignableFrom(cl)) return null; - return lookupForClassObject (cl); + return lookupForClassObject(cl); } /** @@ -85,57 +85,57 @@ * we have a java.lang.Class object C for class A, though A is not * serializable, but it's okay to serialize C. */ - static ObjectStreamClass lookupForClassObject (Class cl) + static ObjectStreamClass lookupForClassObject(Class cl) { if (cl == null) return null; - ObjectStreamClass osc = (ObjectStreamClass)classLookupTable.get (cl); + ObjectStreamClass osc = (ObjectStreamClass)classLookupTable.get(cl); if (osc != null) return osc; else - { - osc = new ObjectStreamClass (cl); - classLookupTable.put (cl, osc); - return osc; - } + { + osc = new ObjectStreamClass(cl); + classLookupTable.put(cl, osc); + return osc; + } } /** - Returns the name of the class that this - ObjectStreamClass represents. - */ - public String getName () + * Returns the name of the class that this + * ObjectStreamClass represents. + */ + public String getName() { return name; } /** - Returns the class that this ObjectStreamClass - represents. Null could be returned if this - ObjectStreamClass was read from an - ObjectInputStream and the class it represents cannot - be found or loaded. - - @see java.io.ObjectInputStream - */ - public Class forClass () + * Returns the class that this ObjectStreamClass + * represents. Null could be returned if this + * ObjectStreamClass was read from an + * ObjectInputStream and the class it represents cannot + * be found or loaded. + * + * @see java.io.ObjectInputStream + */ + public Class forClass() { return clazz; } /** - Returns the serial version stream-unique identifier for the class - represented by this ObjectStreamClass. This SUID is - either defined by the class as static final long - serialVersionUID or is calculated as specified in - Javasoft's "Object Serialization Specification" XXX: add reference - */ - public long getSerialVersionUID () + * Returns the serial version stream-unique identifier for the class + * represented by this ObjectStreamClass. This SUID is + * either defined by the class as static final long + * serialVersionUID or is calculated as specified in + * Javasoft's "Object Serialization Specification" XXX: add reference + */ + public long getSerialVersionUID() { return uid; } @@ -145,10 +145,10 @@ // of the class represented by this ObjectStreamClass. The Fields // are sorted by name. // XXX doc - public ObjectStreamField[] getFields () + public ObjectStreamField[] getFields() { ObjectStreamField[] copy = new ObjectStreamField[ fields.length ]; - System.arraycopy (fields, 0, copy, 0, fields.length); + System.arraycopy(fields, 0, copy, 0, fields.length); return copy; } @@ -158,8 +158,8 @@ // primitiveness. public ObjectStreamField getField (String name) { - for (int i=0; i < fields.length; i++) - if (fields[i].getName ().equals (name)) + for (int i = 0; i < fields.length; i++) + if (fields[i].getName().equals(name)) return fields[i]; return null; } @@ -174,7 +174,7 @@ * @see #getSerialVersionUID() * @see #getName() */ - public String toString () + public String toString() { return "java.io.ObjectStreamClass< " + name + ", " + uid + " >"; } @@ -187,7 +187,7 @@ // // This method is used by the class to override default // serialization behavior. - boolean hasWriteMethod () + boolean hasWriteMethod() { return (flags & ObjectStreamConstants.SC_WRITE_METHOD) != 0; } @@ -200,24 +200,24 @@ // // This method is used by the class to override default // serialization behavior. - boolean hasReadMethod () + boolean hasReadMethod() { - try + try { - Class[] readObjectParams = { ObjectInputStream.class }; - forClass ().getDeclaredMethod ("readObject", readObjectParams); - return true; + Class[] readObjectParams = { ObjectInputStream.class }; + forClass().getDeclaredMethod("readObject", readObjectParams); + return true; } - catch (NoSuchMethodException e) + catch (NoSuchMethodException e) { - return false; + return false; } } // Returns true iff the class that this ObjectStreamClass represents // implements Serializable but does *not* implement Externalizable. - boolean isSerializable () + boolean isSerializable() { return (flags & ObjectStreamConstants.SC_SERIALIZABLE) != 0; } @@ -225,7 +225,7 @@ // Returns true iff the class that this ObjectStreamClass represents // implements Externalizable. - boolean isExternalizable () + boolean isExternalizable() { return (flags & ObjectStreamConstants.SC_EXTERNALIZABLE) != 0; } @@ -235,7 +235,7 @@ // class that is the superclass of the class this // ObjectStreamClass represents. If the superclass is // not Serializable, null is returned. - ObjectStreamClass getSuper () + ObjectStreamClass getSuper() { return superClass; } @@ -245,30 +245,30 @@ // classes of CLAZZ and CLAZZ itself in order from most super to // CLAZZ. ObjectStreamClass[0] is the highest superclass of CLAZZ // that is serializable. - static ObjectStreamClass[] getObjectStreamClasses (Class clazz) + static ObjectStreamClass[] getObjectStreamClasses(Class clazz) { - ObjectStreamClass osc = ObjectStreamClass.lookup (clazz); + ObjectStreamClass osc = ObjectStreamClass.lookup(clazz); if (osc == null) return new ObjectStreamClass[0]; else - { - Vector oscs = new Vector (); - - while (osc != null) { - oscs.addElement (osc); - osc = osc.getSuper (); - } + Vector oscs = new Vector(); + + while (osc != null) + { + oscs.addElement (osc); + osc = osc.getSuper(); + } - int count = oscs.size (); - ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; + int count = oscs.size(); + ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; - for (int i = count - 1; i >= 0; i--) - sorted_oscs[ count - i - 1 ] = (ObjectStreamClass)oscs.elementAt (i); + for (int i = count - 1; i >= 0; i--) + sorted_oscs[ count - i - 1 ] = (ObjectStreamClass)oscs.elementAt(i); - return sorted_oscs; - } + return sorted_oscs; + } } @@ -276,14 +276,14 @@ // properties of the class represented by this ObjectStreamClass. // The bit-flags that could be present are those defined in // ObjectStreamConstants that begin with `SC_' - int getFlags () + int getFlags() { return flags; } - ObjectStreamClass (String name, long uid, byte flags, - ObjectStreamField[] fields) + ObjectStreamClass(String name, long uid, byte flags, + ObjectStreamField[] fields) { this.name = name; this.uid = uid; @@ -302,11 +302,11 @@ * @throws InvalidClassException if an incompatibility between computed UID and * already set UID is found. */ - void setClass (Class cl, ObjectStreamClass superClass) throws InvalidClassException + void setClass(Class cl, ObjectStreamClass superClass) throws InvalidClassException { this.clazz = cl; - long class_uid = getClassUID (cl); + long class_uid = getClassUID(cl); if (uid == 0) uid = class_uid; else @@ -322,9 +322,9 @@ } } - isProxyClass = clazz != null && Proxy.isProxyClass (clazz); + isProxyClass = clazz != null && Proxy.isProxyClass(clazz); this.superClass = superClass; - calculateOffsets (); + calculateOffsets(); try { @@ -345,47 +345,47 @@ i = 0; j = 0; k = 0; while (i < fields.length && j < exportedFields.length) - { - int comp = fields[i].getName().compareTo (exportedFields[j].getName()); + { + int comp = fields[i].getName().compareTo(exportedFields[j].getName()); + + if (comp < 0) + { + newFieldList[k] = fields[i]; + fields[i].setPersistent(false); + fields[i].setToSet(false); + i++; + } + else if (comp > 0) + { + /* field not found in imported fields. We add it + * in the list of supported fields. + */ + newFieldList[k] = exportedFields[j]; + newFieldList[k].setPersistent(true); + newFieldList[k].setToSet(false); + j++; + } + else + { + if (!fields[i].getType().equals(exportedFields[j].getType())) + throw new InvalidClassException + ("serialPersistentFields must be compatible with" + + " imported fields (about " + fields[i].getName() + ")"); + newFieldList[k] = fields[i]; + fields[i].setPersistent(true); + i++; + j++; + } + k++; + } - if (comp < 0) + if (i < fields.length) + for (;i 0) - { - /* field not found in imported fields. We add it - * in the list of supported fields. - */ - newFieldList[k] = exportedFields[j]; - newFieldList[k].setPersistent(true); - newFieldList[k].setToSet(false); - j++; - } - else - { - if (!fields[i].getType().equals (exportedFields[j].getType())) - throw new InvalidClassException ( - "serialPersistentFields must be compatible with" + - " imported fields (about " + fields[i].getName() + ")"); newFieldList[k] = fields[i]; - fields[i].setPersistent(true); - i++; - j++; } - k++; - } - - if (i < fields.length) - for (;i"); - data_out.writeInt (Modifier.STATIC); - data_out.writeUTF ("()V"); } - Constructor constructor; - Constructor[] constructors = cl.getDeclaredConstructors (); - Arrays.sort (constructors, memberComparator); - for (int i=0; i < constructors.length; i++) + // cl didn't define serialVersionUID, so we have to compute it + try { - constructor = constructors[i]; - modifiers = constructor.getModifiers (); - if (Modifier.isPrivate (modifiers)) - continue; + MessageDigest md; + try + { + md = MessageDigest.getInstance("SHA"); + } + catch (NoSuchAlgorithmException e) + { + // If a provider already provides SHA, use it; otherwise, use this. + Gnu gnuProvider = new Gnu(); + Security.addProvider(gnuProvider); + md = MessageDigest.getInstance("SHA"); + } - data_out.writeUTF (""); - data_out.writeInt (modifiers); + DigestOutputStream digest_out = + new DigestOutputStream(nullOutputStream, md); + DataOutputStream data_out = new DataOutputStream(digest_out); + + data_out.writeUTF(cl.getName()); + + int modifiers = cl.getModifiers(); + // just look at interesting bits + modifiers = modifiers & (Modifier.ABSTRACT | Modifier.FINAL + | Modifier.INTERFACE | Modifier.PUBLIC); + data_out.writeInt(modifiers); + + // Pretend that an array has no interfaces, because when array + // serialization was defined (JDK 1.1), arrays didn't have it. + if (! cl.isArray()) + { + Class[] interfaces = cl.getInterfaces(); + Arrays.sort(interfaces, interfaceComparator); + for (int i = 0; i < interfaces.length; i++) + data_out.writeUTF(interfaces[i].getName()); + } - // the replacement of '/' with '.' was needed to make computed - // SUID's agree with those computed by JDK - data_out.writeUTF ( - TypeSignature.getEncodingOfConstructor (constructor).replace ('/','.')); - } + Field field; + Field[] fields = cl.getDeclaredFields(); + Arrays.sort(fields, memberComparator); + for (int i = 0; i < fields.length; i++) + { + field = fields[i]; + modifiers = field.getModifiers(); + if (Modifier.isPrivate(modifiers) + && (Modifier.isStatic(modifiers) + || Modifier.isTransient(modifiers))) + continue; + + data_out.writeUTF(field.getName()); + data_out.writeInt(modifiers); + data_out.writeUTF(TypeSignature.getEncodingOfClass (field.getType())); + } - Method method; - Method[] methods = cl.getDeclaredMethods (); - Arrays.sort (methods, memberComparator); - for (int i=0; i < methods.length; i++) - { - method = methods[i]; - modifiers = method.getModifiers (); - if (Modifier.isPrivate (modifiers)) - continue; + // write class initializer method if present + if (VMObjectStreamClass.hasClassInitializer(cl)) + { + data_out.writeUTF(""); + data_out.writeInt(Modifier.STATIC); + data_out.writeUTF("()V"); + } - data_out.writeUTF (method.getName ()); - data_out.writeInt (modifiers); + Constructor constructor; + Constructor[] constructors = cl.getDeclaredConstructors(); + Arrays.sort (constructors, memberComparator); + for (int i = 0; i < constructors.length; i++) + { + constructor = constructors[i]; + modifiers = constructor.getModifiers(); + if (Modifier.isPrivate(modifiers)) + continue; + + data_out.writeUTF(""); + data_out.writeInt(modifiers); + + // the replacement of '/' with '.' was needed to make computed + // SUID's agree with those computed by JDK + data_out.writeUTF + (TypeSignature.getEncodingOfConstructor(constructor).replace('/','.')); + } - // the replacement of '/' with '.' was needed to make computed - // SUID's agree with those computed by JDK - data_out.writeUTF ( - TypeSignature.getEncodingOfMethod (method).replace ('/', '.')); - } + Method method; + Method[] methods = cl.getDeclaredMethods(); + Arrays.sort(methods, memberComparator); + for (int i = 0; i < methods.length; i++) + { + method = methods[i]; + modifiers = method.getModifiers(); + if (Modifier.isPrivate(modifiers)) + continue; + + data_out.writeUTF(method.getName()); + data_out.writeInt(modifiers); + + // the replacement of '/' with '.' was needed to make computed + // SUID's agree with those computed by JDK + data_out.writeUTF + (TypeSignature.getEncodingOfMethod(method).replace('/', '.')); + } - data_out.close (); - byte[] sha = md.digest (); - long result = 0; - int len = sha.length < 8 ? sha.length : 8; - for (int i=0; i < len; i++) - result += (long)(sha[i] & 0xFF) << (8 * i); + data_out.close(); + byte[] sha = md.digest(); + long result = 0; + int len = sha.length < 8 ? sha.length : 8; + for (int i = 0; i < len; i++) + result += (long)(sha[i] & 0xFF) << (8 * i); - return result; - } + return result; + } catch (NoSuchAlgorithmException e) - { - throw new RuntimeException ("The SHA algorithm was not found to use in computing the Serial Version UID for class " - + cl.getName (), e); - } + { + throw new RuntimeException + ("The SHA algorithm was not found to use in computing the Serial Version UID for class " + + cl.getName(), e); + } catch (IOException ioe) - { - throw new RuntimeException (ioe); - } + { + throw new RuntimeException(ioe); + } } /** @@ -713,7 +719,7 @@ * @param clazz Class to retrieve 'serialPersistentFields' from. * @return The content of 'serialPersistentFields'. */ - private ObjectStreamField[] getSerialPersistentFields (Class clazz) + private ObjectStreamField[] getSerialPersistentFields(Class clazz) throws NoSuchFieldException, IllegalAccessException { ObjectStreamField[] fieldsArray = null; @@ -721,16 +727,16 @@ // Use getDeclaredField rather than getField for the same reason // as above in getDefinedSUID. - Field f = clazz.getDeclaredField ("serialPersistentFields"); + Field f = clazz.getDeclaredField("serialPersistentFields"); f.setAccessible(true); int modifiers = f.getModifiers(); - if (!(Modifier.isStatic (modifiers) && - Modifier.isFinal (modifiers) && - Modifier.isPrivate (modifiers))) + if (!(Modifier.isStatic(modifiers) && + Modifier.isFinal(modifiers) && + Modifier.isPrivate(modifiers))) return null; - o = (ObjectStreamField[])f.get (null); + o = (ObjectStreamField[])f.get(null); if (o == null) return null; @@ -743,10 +749,10 @@ public static final ObjectStreamField[] NO_FIELDS = {}; - private static Hashtable classLookupTable = new Hashtable (); - private static final NullOutputStream nullOutputStream = new NullOutputStream (); - private static final Comparator interfaceComparator = new InterfaceComparator (); - private static final Comparator memberComparator = new MemberComparator (); + private static Hashtable classLookupTable = new Hashtable(); + private static final NullOutputStream nullOutputStream = new NullOutputStream(); + private static final Comparator interfaceComparator = new InterfaceComparator(); + private static final Comparator memberComparator = new MemberComparator(); private static final Class[] writeMethodArgTypes = { java.io.ObjectOutputStream.class }; @@ -776,9 +782,9 @@ // interfaces are compared only by name class InterfaceComparator implements Comparator { - public int compare (Object o1, Object o2) + public int compare(Object o1, Object o2) { - return ((Class)o1).getName ().compareTo (((Class)o2).getName ()); + return ((Class)o1).getName().compareTo(((Class)o2).getName()); } } @@ -787,16 +793,16 @@ // conflicts are resolved by comparing type signatures class MemberComparator implements Comparator { - public int compare (Object o1, Object o2) + public int compare(Object o1, Object o2) { Member m1 = (Member)o1; Member m2 = (Member)o2; - int comp = m1.getName ().compareTo (m2.getName ()); + int comp = m1.getName().compareTo(m2.getName()); if (comp == 0) - return TypeSignature.getEncodingOfMember (m1). - compareTo (TypeSignature.getEncodingOfMember (m2)); + return TypeSignature.getEncodingOfMember(m1). + compareTo(TypeSignature.getEncodingOfMember(m2)); else return comp; } --------------070608090302090203070904-- From MAILER-DAEMON Sun Dec 28 17:54:54 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AajoE-0000bu-8J for mharc-commit-classpath@gnu.org; Sun, 28 Dec 2003 17:54:54 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AajoB-0000Xf-Ea for commit-classpath@gnu.org; Sun, 28 Dec 2003 17:54:51 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aajnf-0000Hi-9c for commit-classpath@gnu.org; Sun, 28 Dec 2003 17:54:50 -0500 Received: from [212.6.122.126] (helo=mail3.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aajne-0000Hf-PK for commit-classpath@gnu.org; Sun, 28 Dec 2003 17:54:18 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-80-016.ewetel.net [80.228.80.16]) by mail3.ewetel.de (8.12.1/8.12.9) with ESMTP id hBSLqn1h013905 for ; Sun, 28 Dec 2003 22:52:50 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AaitX-0007zj-00 for ; Sun, 28 Dec 2003 22:56:19 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Sun, 28 Dec 2003 22:55:52 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_oF17/qER41TMQEw" Message-Id: <200312282255.53655.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: http connection fixes X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 22:54:52 -0000 --Boundary-00=_oF17/qER41TMQEw Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch which includes fixes I med during merging with libgcj. Michael --Boundary-00=_oF17/qER41TMQEw Content-Type: text/x-diff; charset="us-ascii"; name="http.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="http.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1730 diff -u -b -B -r1.1730 ChangeLog --- ChangeLog 28 Dec 2003 10:14:10 -0000 1.1730 +++ ChangeLog 28 Dec 2003 21:47:04 -0000 @@ -1,3 +1,13 @@ +2003-12-28 Michael Koch + + * gnu/java/net/HeaderFieldHelper.java + (getHeaderFieldValueByKey): New method. + (getHeaderFields): New method. + * gnu/java/net/protocol/http/Connection.java + (connect): Lowercase key before adding to HeaderFieldHelper object. + (getHeaderField): New method. + (getHeaderFields): New method. + 2003-12-28 Guilhem Lavaux * java/io/LineNumberReader.java Index: gnu/java/net/HeaderFieldHelper.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/HeaderFieldHelper.java,v retrieving revision 1.4 diff -u -b -B -r1.4 HeaderFieldHelper.java --- gnu/java/net/HeaderFieldHelper.java 20 Oct 2003 14:06:01 -0000 1.4 +++ gnu/java/net/HeaderFieldHelper.java 28 Dec 2003 21:47:04 -0000 @@ -38,6 +38,8 @@ package gnu.java.net; +import java.util.HashMap; +import java.util.Map; import java.util.Vector; /** @@ -95,6 +97,36 @@ } return value; + } + + public String getHeaderFieldValueByKey(String key) + { + String value = null; + + try + { + value = (String) headerFieldValues.elementAt + (headerFieldKeys.indexOf(key)); + } + catch (ArrayIndexOutOfBoundsException e) + { + } + + return value; + } + + public Map getHeaderFields() + { + HashMap headers = new HashMap(); + int max = headerFieldKeys.size(); + + for (int index = 0; index < max; index++) + { + headers.put(headerFieldKeys.elementAt(index), + headerFieldValues.elementAt(index)); + } + + return headers; } public int getNumberOfEntries() Index: gnu/java/net/protocol/http/Connection.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/Connection.java,v retrieving revision 1.10 diff -u -b -B -r1.10 Connection.java --- gnu/java/net/protocol/http/Connection.java 27 Dec 2003 20:30:26 -0000 1.10 +++ gnu/java/net/protocol/http/Connection.java 28 Dec 2003 21:47:04 -0000 @@ -303,7 +302,7 @@ { if (key != null) { - headers.addHeaderField (key, value); + headers.addHeaderField (key.toLowerCase(), value); key = null; value = null; } @@ -333,7 +332,7 @@ if (key != null) { - headers.addHeaderField (key, value); + headers.addHeaderField (key.toLowerCase(), value.toLowerCase()); } } @@ -409,6 +408,36 @@ else throw new ProtocolException ("Unsupported or unknown request method " + method); + } + + public String getHeaderField(String name) + { + if (!connected) + try + { + connect(); + } + catch (IOException x) + { + return null; + } + + return (String) headers.getHeaderFieldValueByKey(name.toLowerCase()); + } + + public Map getHeaderFields() + { + if (!connected) + try + { + connect(); + } + catch (IOException x) + { + return null; + } + + return headers.getHeaderFields(); } /** --Boundary-00=_oF17/qER41TMQEw-- From MAILER-DAEMON Mon Dec 29 03:59:15 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AatF5-0007pK-8l for mharc-commit-classpath@gnu.org; Mon, 29 Dec 2003 03:59:15 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AatF2-0007p5-CL for commit-classpath@gnu.org; Mon, 29 Dec 2003 03:59:12 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AatEW-0007OJ-RJ for commit-classpath@gnu.org; Mon, 29 Dec 2003 03:59:11 -0500 Received: from [62.177.154.238] (helo=lembu.sumatrasoftware.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AatEW-0007Mj-HO for commit-classpath@gnu.org; Mon, 29 Dec 2003 03:58:40 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 29 Dec 2003 08:57:08 +0100 Message-ID: <788B535AB1F9CB49BB9C229372B50ACC04C744@LEMBU.sumatrasoftware.com> Content-class: urn:content-classes:message X-MS-Has-Attach: X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0 X-MS-TNEF-Correlator: Thread-Topic: Serialization Thread-Index: AcPNZl++UGMOo2JDSga0aWPTbod/WQAep3RA From: "Jeroen Frijters" To: "Guilhem Lavaux" , Cc: Subject: RE: Serialization X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 08:59:12 -0000 Guilhem Lavaux wrote: >+ try >+ { >+ Class field_type =3D field.getType(); >+ =20 >+ if (type =3D=3D field_type || >+ (type =3D=3D null && !field_type.isPrimitive())) >+ { >+ /* See defaulted */ >+ return field; >+ } >+ =20 >+ illegal =3D true; >+ throw new IllegalArgumentException >+ ("Field requested is of type " >+ + field_type.getName() >+ + ", but requested type was " >+ + (type =3D=3D null ? "Object" : type.getName())); >+ } >+ catch (NullPointerException _) >+ { >+ /* Here we catch NullPointerException, because it may >+ only come from the call 'field.getType()'. If field >+ is null, we have to return null and classpath ethic >+ say we must try to avoid 'if (xxx =3D=3D null)'. >+ */ >+ }=20 *Please* don't use exception handling instead of an explicit null check. Regards, Jeroen From MAILER-DAEMON Mon Dec 29 06:41:28 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aavm4-0002eg-6P for mharc-commit-classpath@gnu.org; Mon, 29 Dec 2003 06:41:28 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aavm0-0002cH-Kc for commit-classpath@gnu.org; Mon, 29 Dec 2003 06:41:24 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AavlT-0002O9-Nt for commit-classpath@gnu.org; Mon, 29 Dec 2003 06:41:22 -0500 Received: from [62.4.16.101] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AavlG-0002IH-U6 for commit-classpath@gnu.org; Mon, 29 Dec 2003 06:40:39 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 23756418C6; Mon, 29 Dec 2003 11:39:10 +0100 (CET) Message-ID: <3FF0046C.6030905@kaffe.org> Date: Mon, 29 Dec 2003 11:39:40 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeroen Frijters References: <788B535AB1F9CB49BB9C229372B50ACC04C744@LEMBU.sumatrasoftware.com> In-Reply-To: <788B535AB1F9CB49BB9C229372B50ACC04C744@LEMBU.sumatrasoftware.com> X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: commit-classpath@gnu.org Subject: Re: Serialization X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 11:41:26 -0000 Jeroen Frijters wrote: >Guilhem Lavaux wrote: > > >>+ try >>+ { >>+ Class field_type = field.getType(); >>+ >>+ if (type == field_type || >>+ (type == null && !field_type.isPrimitive())) >>+ { >>+ /* See defaulted */ >>+ return field; >>+ } >>+ >>+ illegal = true; >>+ throw new IllegalArgumentException >>+ ("Field requested is of type " >>+ + field_type.getName() >>+ + ", but requested type was " >>+ + (type == null ? "Object" : type.getName())); >>+ } >>+ catch (NullPointerException _) >>+ { >>+ /* Here we catch NullPointerException, because it may >>+ only come from the call 'field.getType()'. If field >>+ is null, we have to return null and classpath ethic >>+ say we must try to avoid 'if (xxx == null)'. >>+ */ >>+ } >> >> > >*Please* don't use exception handling instead of an explicit null check. > > > ok, changed. Thank you for reviewing the code. Regards, Guilhem. From MAILER-DAEMON Mon Dec 29 07:36:52 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aawde-0003EA-4N for mharc-commit-classpath@gnu.org; Mon, 29 Dec 2003 07:36:50 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AawdR-0003B4-KC for commit-classpath@gnu.org; Mon, 29 Dec 2003 07:36:37 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AawW6-0002BR-Vk for commit-classpath@gnu.org; Mon, 29 Dec 2003 07:29:34 -0500 Received: from [62.4.16.101] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AawUp-0001sQ-1D for commit-classpath@gnu.org; Mon, 29 Dec 2003 07:27:43 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 4D9104130E for ; Mon, 29 Dec 2003 12:26:14 +0100 (CET) Message-ID: <3FF00F74.7080004@kaffe.org> Date: Mon, 29 Dec 2003 12:26:44 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------050904080408020409050507" Subject: FYI: java.io.ObjectInputStream X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 12:36:40 -0000 This is a multi-part message in MIME format. --------------050904080408020409050507 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Here is a patch to use a "if (x == null)" structure instead of a "try { } catch". Guilhem. --------------050904080408020409050507 Content-Type: text/plain; name="patch_stream" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_stream" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1734 diff -u -r1.1734 ChangeLog --- ChangeLog 28 Dec 2003 21:50:38 -0000 1.1734 +++ ChangeLog 29 Dec 2003 11:25:04 -0000 @@ -1,3 +1,8 @@ +2003-12-29 Guilhem Lavaux + + * java/io/ObjectInputStream.java: Use if instead of catching + NullPointerException. + 2003-12-28 Michael Koch * gnu/java/net/HeaderFieldHelper.java Index: java/io/ObjectInputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectInputStream.java,v retrieving revision 1.35 diff -u -r1.35 ObjectInputStream.java --- java/io/ObjectInputStream.java 28 Dec 2003 18:12:43 -0000 1.35 +++ java/io/ObjectInputStream.java 29 Dec 2003 11:25:04 -0000 @@ -1261,35 +1261,24 @@ try { - try + if (field != null) { Class field_type = field.getType(); - if (type == field_type || - (type == null && !field_type.isPrimitive())) - { - /* See defaulted */ - return field; - } - + if ((type == field_type) + || ((type == null) && ! field_type.isPrimitive())) + + /* See defaulted */ + return field; + illegal = true; throw new IllegalArgumentException ("Field requested is of type " + field_type.getName() + ", but requested type was " - + (type == null ? "Object" : type.getName())); - } - catch (NullPointerException _) - { - /* Here we catch NullPointerException, because it may - only come from the call 'field.getType()'. If field - is null, we have to return null and classpath ethic - say we must try to avoid 'if (xxx == null)'. - */ - } - catch (IllegalArgumentException e) - { - throw e; + + ((type == null) + ? "Object" + : type.getName())); } return null; --------------050904080408020409050507-- From MAILER-DAEMON Mon Dec 29 07:44:08 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aawju-00052q-D2 for mharc-commit-classpath@gnu.org; Mon, 29 Dec 2003 07:43:18 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aawjc-0004qc-UV for commit-classpath@gnu.org; Mon, 29 Dec 2003 07:43:00 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aawj0-0004PP-R7 for commit-classpath@gnu.org; Mon, 29 Dec 2003 07:42:54 -0500 Received: from [62.4.16.101] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aawj0-0004OU-0q for commit-classpath@gnu.org; Mon, 29 Dec 2003 07:42:22 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 1F80B40F22 for ; Mon, 29 Dec 2003 12:40:44 +0100 (CET) Message-ID: <3FF012DA.9000308@kaffe.org> Date: Mon, 29 Dec 2003 12:41:14 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------060009030004040505000409" Subject: FYI: java.io.ObjectStreamClass X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 12:43:05 -0000 This is a multi-part message in MIME format. --------------060009030004040505000409 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Here is a small reindentation patch. For more reindentation we will wait for the robot. ;-) Guilhem. --------------060009030004040505000409 Content-Type: text/plain; name="patch_stream" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_stream" Index: java/io/ObjectStreamClass.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamClass.java,v retrieving revision 1.27 diff -u -r1.27 ObjectStreamClass.java --- java/io/ObjectStreamClass.java 28 Dec 2003 18:12:43 -0000 1.27 +++ java/io/ObjectStreamClass.java 29 Dec 2003 11:38:49 -0000 @@ -90,7 +90,7 @@ if (cl == null) return null; - ObjectStreamClass osc = (ObjectStreamClass)classLookupTable.get(cl); + ObjectStreamClass osc = (ObjectStreamClass) classLookupTable.get(cl); if (osc != null) return osc; @@ -265,7 +265,7 @@ ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; for (int i = count - 1; i >= 0; i--) - sorted_oscs[ count - i - 1 ] = (ObjectStreamClass)oscs.elementAt(i); + sorted_oscs[ count - i - 1 ] = (ObjectStreamClass) oscs.elementAt(i); return sorted_oscs; } @@ -413,7 +413,6 @@ superClass = osc; } - void calculateOffsets() { int i; @@ -694,7 +693,7 @@ long result = 0; int len = sha.length < 8 ? sha.length : 8; for (int i = 0; i < len; i++) - result += (long)(sha[i] & 0xFF) << (8 * i); + result += (long) (sha[i] & 0xFF) << (8 * i); return result; } @@ -736,7 +735,7 @@ Modifier.isPrivate(modifiers))) return null; - o = (ObjectStreamField[])f.get(null); + o = (ObjectStreamField[]) f.get(null); if (o == null) return null; @@ -784,7 +783,7 @@ { public int compare(Object o1, Object o2) { - return ((Class)o1).getName().compareTo(((Class)o2).getName()); + return ((Class) o1).getName().compareTo(((Class) o2).getName()); } } @@ -795,8 +794,8 @@ { public int compare(Object o1, Object o2) { - Member m1 = (Member)o1; - Member m2 = (Member)o2; + Member m1 = (Member) o1; + Member m2 = (Member) o2; int comp = m1.getName().compareTo(m2.getName()); --------------060009030004040505000409-- From MAILER-DAEMON Mon Dec 29 08:14:41 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Aax8F-0005w9-3f for mharc-commit-classpath@gnu.org; Mon, 29 Dec 2003 08:08:27 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aax83-0005sv-2d for commit-classpath@gnu.org; Mon, 29 Dec 2003 08:08:15 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aax7Q-0005eN-Lv for commit-classpath@gnu.org; Mon, 29 Dec 2003 08:08:09 -0500 Received: from [62.4.16.101] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aax4Z-00054C-SX for commit-classpath@gnu.org; Mon, 29 Dec 2003 08:04:40 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 10346414E0 for ; Mon, 29 Dec 2003 13:03:10 +0100 (CET) Message-ID: <3FF0181B.7080200@kaffe.org> Date: Mon, 29 Dec 2003 13:03:39 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------030306070300010405090106" Subject: FYI: java.util.GregorianCalendar and java.net.URLStreamHandler X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 13:08:24 -0000 This is a multi-part message in MIME format. --------------030306070300010405090106 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Here are two small fixes: one from Ito about DAY_OF_WEEK_IN_MONTH and another to fix relative path which should be transformed into absolute in URLs. Guilhem. --------------030306070300010405090106 Content-Type: text/plain; name="patch_merge" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_merge" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1735 diff -u -r1.1735 ChangeLog --- ChangeLog 29 Dec 2003 11:41:55 -0000 1.1735 +++ ChangeLog 29 Dec 2003 12:01:56 -0000 @@ -1,5 +1,15 @@ 2003-12-29 Guilhem Lavaux + * java/net/URLStreamHandler.java + (parseURL): Change a relative path into an + absolute if the original URL does not have any path. + + * java/util/GregorianCalendar.java + (computeFields): Reported by Ito Kazumitsu . + Fixed the computation of DAY_OF_WEEK_IN_MONTH. + +2003-12-29 Guilhem Lavaux + * java/io/ObjectStreamClass.java: Reindented. 2003-12-29 Guilhem Lavaux Index: java/util/GregorianCalendar.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/GregorianCalendar.java,v retrieving revision 1.22 diff -u -r1.22 GregorianCalendar.java --- java/util/GregorianCalendar.java 26 Dec 2003 15:23:34 -0000 1.22 +++ java/util/GregorianCalendar.java 29 Dec 2003 12:01:57 -0000 @@ -610,7 +610,7 @@ calculateDay(++day, gregorian); } - fields[DAY_OF_WEEK_IN_MONTH] = (fields[DAY_OF_MONTH] + 12) / 7; + fields[DAY_OF_WEEK_IN_MONTH] = (fields[DAY_OF_MONTH] + 6) / 7; // which day of the week are we (0..6), relative to getFirstDayOfWeek int relativeWeekday = (7 + fields[DAY_OF_WEEK] - getFirstDayOfWeek()) % 7; Index: java/net/URLStreamHandler.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/URLStreamHandler.java,v retrieving revision 1.22 diff -u -r1.22 URLStreamHandler.java --- java/net/URLStreamHandler.java 27 Nov 2003 09:52:56 -0000 1.22 +++ java/net/URLStreamHandler.java 29 Dec 2003 12:01:58 -0000 @@ -186,6 +186,8 @@ // No file context available; just spec for file. // Or this is an absolute path name; ignore any file context. file = spec.substring(start, end); + if (start < end && spec.charAt(start) != '/') + file = "/" + file; ref = null; } else if (start < end) --------------030306070300010405090106-- From MAILER-DAEMON Mon Dec 29 14:10:02 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1Ab2mA-000788-53 for mharc-commit-classpath@gnu.org; Mon, 29 Dec 2003 14:10:02 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Ab2m3-000769-VG for commit-classpath@gnu.org; Mon, 29 Dec 2003 14:09:55 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Ab2lW-0006p4-6Q for commit-classpath@gnu.org; Mon, 29 Dec 2003 14:09:53 -0500 Received: from [62.4.16.101] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ab2lU-0006nz-M9 for commit-classpath@gnu.org; Mon, 29 Dec 2003 14:09:20 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 8964640F73 for ; Mon, 29 Dec 2003 19:07:44 +0100 (CET) Message-ID: <3FF06D8E.7090209@kaffe.org> Date: Mon, 29 Dec 2003 19:08:14 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------080904020500030903070703" Subject: FYI: java.text.RuleBasedCollator and java.text.CollationElementIterator X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 19:09:58 -0000 This is a multi-part message in MIME format. --------------080904020500030903070703 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I am merging the new code for RuleBasedCollator and CollationElementIterator. I've tested it with mauve and it gives only 4 failures (for 242 tests), so it's nearly perfect compared to the JDK. There's only one feature which is still not completely implemented: reverse accent ordering. I've tried to indent it correctly, please tell if you see something wrong. Regards, Guilhem. --------------080904020500030903070703 Content-Type: text/plain; name="patch_collator" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_collator" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1736 diff -u -r1.1736 ChangeLog --- ChangeLog 29 Dec 2003 12:04:50 -0000 1.1736 +++ ChangeLog 29 Dec 2003 18:05:33 -0000 @@ -1,5 +1,11 @@ 2003-12-29 Guilhem Lavaux + * java/text/RuleBasedCollator.java, + java/text/CollationElementIterator.java: + Parser rewritten. All but one feature implemented. + +2003-12-29 Guilhem Lavaux + * java/net/URLStreamHandler.java (parseURL): Change a relative path into an absolute if the original URL does not have any path. Index: java/text/RuleBasedCollator.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/RuleBasedCollator.java,v retrieving revision 1.17 diff -u -r1.17 RuleBasedCollator.java --- java/text/RuleBasedCollator.java 21 Oct 2003 14:56:12 -0000 1.17 +++ java/text/RuleBasedCollator.java 29 Dec 2003 18:05:34 -0000 @@ -39,6 +39,9 @@ package java.text; import java.util.Vector; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Comparator; /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. @@ -60,7 +63,10 @@ *
  • Reset: '&' : * * The modifier character indicates that accents sort backward as is the - * case with French. The relational operators specify how the text + * case with French. The modifier applies to all rules after + * the modifier but before the next primary sequence. If placed at the end + * of the sequence if applies to all unknown accented character. + * The relational operators specify how the text * argument relates to the previous term. The relation characters have * the following meanings: *
      @@ -111,6 +117,9 @@ * anywhere in the previous rule string segment so the rule following the * reset rule cannot be inserted. *

      + * "< a & A @ < e & E < f& F" - This sequence is equivalent to the following + * "< a & A < E & e < f & F". + *

      * For a description of the various comparison strength types, see the * documentation for the Collator class. *

      @@ -132,270 +141,591 @@ * * @author Aaron M. Renn * @author Tom Tromey - * @date March 25, 1999 + * @author Guilhem Lavaux */ public class RuleBasedCollator extends Collator { + /** + * This class describes what rank has a character (or a sequence of characters) + * in the lexicographic order. Each element in a rule has a collation element. + */ final class CollationElement { String char_seq; int primary; short secondary; short tertiary; + short equality; + boolean ignore; + String expansion; - CollationElement (String char_seq, int primary, short secondary, short tertiary) + CollationElement(String char_seq, int primary, short secondary, short tertiary, + short equality, String expansion) { this.char_seq = char_seq; this.primary = primary; this.secondary = secondary; this.tertiary = tertiary; + this.equality = equality; + this.ignore = false; + this.expansion = expansion; + } + + CollationElement(String char_seq) + { + this.char_seq = char_seq; + this.ignore = true; + } + + final int getValue() + { + return (primary << 16) + (secondary << 8) + tertiary; } } // inner class CollationElement /** - * This the the original rule string. - */ - private String rules; + * Basic collation instruction (internal format) to build the series of + * collation elements. It contains an instruction which specifies the new + * state of the generator. The sequence of instruction should not contain + * RESET (it is used by + * {@link #mergeRules(int,java.lang.String,java.util.Vector,java.util.Vector)}) + * as a temporary state while merging two sets of instructions. + */ + final class CollationSorter + { + static final int GREATERP = 0; + static final int GREATERS = 1; + static final int GREATERT = 2; + static final int EQUAL = 3; + static final int RESET = 4; + static final int IGNORE = 5; + static final int INVERSE_SECONDARY = 6; + + int comparisonType; + String textElement; + int hashText; + int offset; + + String expansionOrdering; + } /** - * This is the table of collation element values - */ - private Object[] ce_table; - - /** - * This method initializes a new instance of RuleBasedCollator - * with the specified collation rules. Note that an application normally - * obtains an instance of RuleBasedCollator by calling the - * getInstance method of Collator. That method - * automatically loads the proper set of rules for the desired locale. - * - * @param rules The collation rule string. + * This method returns the number of common characters at the beginning + * of the string of the two parameters. * - * @exception ParseException If the rule string contains syntax errors. + * @param prefix A string considered as a prefix to test against + * the other string. + * @param s A string to test the prefix against. + * @return The number of common characters. */ - public RuleBasedCollator (String rules) throws ParseException + static int findPrefixLength(String prefix, String s) { - if (rules.equals ("")) - throw new ParseException ("empty rule set", 0); + int i; + + for (i = 0; i < prefix.length() && i < s.length(); i++) + { + if (prefix.charAt(i) != s.charAt(i)) + return i; + } + return i; + } + + /** + * Here we are merging two sets of sorting instructions: 'patch' into 'main'. This methods + * checks whether it is possible to find an anchor point for the rules to be merged and + * then insert them at that precise point. + * + * @param offset Offset in the string containing rules of the beginning of the rules + * being merged in. + * @param starter Text of the rules being merged. + * @param main Repository of all already parsed rules. + * @param patch Rules to be merged into the repository. + * @throws ParseException if it is impossible to find an anchor point for the new rules. + */ + private void mergeRules(int offset, String starter, Vector main, Vector patch) + throws ParseException + { + Enumeration elements = main.elements(); + int insertion_point = -1; + int max_length = 0; - this.rules = rules; - Vector vec = new Vector(); - boolean ignore_chars = true; - int primary_seq = 0; - short secondary_seq = 0; - short tertiary_seq = 0; - StringBuffer argument = new StringBuffer(); - int len = rules.length(); + /* We must check that no rules conflict with another already present. If it + * is the case delete the old rule. + */ - for (int index = 0; index < len; ++index) + /* For the moment good old O(N^2) algorithm. + */ + for (int i = 0; i < patch.size(); i++) { - char c = rules.charAt (index); + int j = 0; + + while (j < main.size()) + { + CollationSorter rule1 = (CollationSorter) patch.elementAt(i); + CollationSorter rule2 = (CollationSorter) main.elementAt(j); + + if (rule1.textElement.equals(rule2.textElement)) + main.removeElementAt(j); + else + j++; + } + } - // Just skip whitespace. - if (Character.isWhitespace (c)) - continue; + // Find the insertion point... O(N) + for (int i = 0; i < main.size(); i++) + { + CollationSorter sorter = (CollationSorter) main.elementAt(i); + int length = findPrefixLength(starter, sorter.textElement); + + if (length > max_length) + { + max_length = length; + insertion_point = i+1; + } + } - // Primary difference - if (c == '<') - { - ignore_chars = false; - CollationElement e = new CollationElement (argument.toString(), primary_seq, - secondary_seq, - tertiary_seq); - secondary_seq = 0; - tertiary_seq = 0; - ++primary_seq; - - vec.add (e); - argument.setLength (0); - continue; - } + if (insertion_point < 0) + throw new ParseException("no insertion point found for " + starter, offset); - // Secondary difference - if (c == ';') - { - if (primary_seq == 0) - throw new ParseException (rules, index); + if (max_length < starter.length()) + { + /* + * We need to expand the first entry. It must be sorted + * like if it was the reference key itself (like the spec + * said. So the first entry is special: the element is + * replaced by the specified text element for the sorting. + * This text replace the old one for comparisons. However + * to preserve the behaviour we replace the first key (corresponding + * to the found prefix) by a new code rightly ordered in the + * sequence. The rest of the subsequence must be appended + * to the end of the sequence. + */ + CollationSorter sorter = (CollationSorter) patch.elementAt(0); + CollationSorter expansionPrefix = + (CollationSorter) main.elementAt(insertion_point-1); + + sorter.expansionOrdering = starter.substring(max_length); // Skip the first good prefix element + + main.insertElementAt(sorter, insertion_point); + + /* + * This is a new set of rules. Append to the list. + */ + patch.removeElementAt(0); + insertion_point = main.size(); + } - CollationElement e = new CollationElement (argument.toString(), primary_seq, - secondary_seq, - tertiary_seq); - ++secondary_seq; - tertiary_seq = 0; - - vec.add (e); - argument.setLength (0); - continue; - } + // Now insert all elements of patch at the insertion point. + for (int i = 0; i < patch.size(); i++) + main.insertElementAt(patch.elementAt(i), i+insertion_point); + } - // Tertiary difference - if (c == ',') - { - if (primary_seq == 0) - throw new ParseException (rules, index); + /** + * This method parses a string and build a set of sorting instructions. The parsing + * may only be partial on the case the rules are to be merged sometime later. + * + * @param stop_on_reset If this parameter is true then the parser stops when it + * encounters a reset instruction. In the other case, it tries to parse the subrules + * and merged it in the same repository. + * @param v Output vector for the set of instructions. + * @param base_offset Offset in the string to begin parsing. + * @param rules Rules to be parsed. + * @return -1 if the parser reached the end of the string, an integer representing the + * offset in the string at which it stopped parsing. + * @throws ParseException if something turned wrong during the parsing. To get details + * decode the message. + */ + private int subParseString(boolean stop_on_reset, Vector v, + int base_offset, String rules) + throws ParseException + { + boolean ignoreChars = (base_offset == 0); + int operator = -1; + StringBuffer sb = new StringBuffer(""); + boolean doubleQuote = false; + boolean eatingChars = false; + boolean nextIsModifier = false; + boolean isModifier = false; + int i; + +main_parse_loop: + for (i = 0; i < rules.length(); i++) + { + char c = rules.charAt(i); + int type = -1; + + if (!eatingChars && + ((c >= 0x09 && c <= 0x0D) || (c == 0x20))) + continue; - CollationElement e = new CollationElement (argument.toString(), primary_seq, - secondary_seq, - tertiary_seq); - ++tertiary_seq; - - vec.add (e); - argument.setLength (0); - continue; - } + isModifier = nextIsModifier; + nextIsModifier = false; - // Is equal to - if (c == '=') - { - if (primary_seq == 0) - throw new ParseException (rules, index); + if (eatingChars && c != '\'') + { + doubleQuote = false; + sb.append(c); + continue; + } + if (doubleQuote && eatingChars) + { + sb.append(c); + doubleQuote = false; + continue; + } - CollationElement e = new CollationElement (argument.toString(), primary_seq, - secondary_seq, - tertiary_seq); - vec.add (e); - argument.setLength (0); - continue; - } + switch (c) { + case '!': + throw new ParseException + ("Modifier '!' is not yet supported by Classpath", i+base_offset); + case '<': + ignoreChars = false; + type = CollationSorter.GREATERP; + break; + case ';': + if (!ignoreChars) + type = CollationSorter.GREATERS; + else + type = CollationSorter.IGNORE; + break; + case ',': + if (!ignoreChars) + type = CollationSorter.GREATERT; + else + type = CollationSorter.IGNORE; + break; + case '=': + if (!ignoreChars) + type = CollationSorter.EQUAL; + else + type = CollationSorter.IGNORE; + break; + case '\'': + eatingChars = !eatingChars; + doubleQuote = true; + break; + case '@': + if (ignoreChars) + throw new ParseException + ("comparison list has not yet been started. You may only use" + + "(<,;=&)", i+base_offset); + // Inverse the order of secondaries from now on. + nextIsModifier = true; + type = CollationSorter.INVERSE_SECONDARY; + break; + case '&': + type = CollationSorter.RESET; + if (stop_on_reset) + break main_parse_loop; + break; + default: + if (operator < 0) + throw new ParseException + ("operator missing at " + (i+base_offset), i+base_offset); + if (!eatingChars && + ((c >= 0x21 && c <= 0x2F) + || (c >= 0x3A && c <= 0x40) + || (c >= 0x5B && c <= 0x60) + || (c >= 0x7B && c <= 0x7E))) + throw new ParseException + ("unquoted punctuation character '"+c+"'", i+base_offset); + + //type = ignoreChars ? CollationSorter.IGNORE : -1; + sb.append(c); + break; + } - // Sort accents backwards - if (c == '@') - { - throw new ParseException("French style accents not implemented yet", 0); - } + if (type < 0) + continue; - // Reset command - if (c == '&') - { - throw new ParseException("Reset not implemented yet", 0); - } + if (operator < 0) + { + operator = type; + continue; + } - // See if we are still reading characters to skip - if (ignore_chars == true) - { - CollationElement e = new CollationElement (c + "", 0, (short)0, - (short)0); - vec.add(e); - continue; - } + if (sb.length() == 0 && !isModifier) + throw new ParseException + ("text element empty at " + (i+base_offset), i+base_offset); + + if (operator == CollationSorter.RESET) + { + /* Reposition in the sorting list at the position + * indicated by the text element. + */ + String subrules = rules.substring(i); + Vector sorted_rules = new Vector(); + int idx; + + // Parse the subrules but do not iterate through all + // sublist. This is the priviledge of the first call. + idx = subParseString(true, sorted_rules, base_offset+i, subrules); + + // Merge new parsed rules into the list. + mergeRules(base_offset+i, sb.toString(), v, sorted_rules); + sb.setLength(0); + + // Reset state to none. + operator = -1; + type = -1; + // We have found a new subrule at 'idx' but it has not been parsed. + if (idx >= 0) + { + i += idx-1; + continue main_parse_loop; + } + else + // No more rules. + break main_parse_loop; + } + + CollationSorter sorter = new CollationSorter(); + + sorter.comparisonType = operator; + sorter.textElement = sb.toString(); + sorter.hashText = sorter.textElement.hashCode(); + sorter.offset = base_offset+rules.length(); + sb.setLength(0); - argument.append (c); + v.add(sorter); + operator = type; } - if (argument.length() > 0) + if (operator >= 0) { - CollationElement e = new CollationElement (argument.toString(), primary_seq, - secondary_seq, tertiary_seq); - vec.add (e); + CollationSorter sorter = new CollationSorter(); + int pos = rules.length() + base_offset; + + if ((sb.length() != 0 && nextIsModifier) + || (sb.length() == 0 && !nextIsModifier && !eatingChars)) + throw new ParseException("text element empty at " + pos, pos); + + sorter.comparisonType = operator; + sorter.textElement = sb.toString(); + sorter.hashText = sorter.textElement.hashCode(); + sorter.offset = base_offset+pos; + v.add(sorter); } - ce_table = vec.toArray(); + if (i == rules.length()) + return -1; + else + return i; } /** - * This method creates a copy of this object. + * This method completely parses a string 'rules' containing sorting rules. * - * @return A copy of this object. + * @param rules String containing the rules to be parsed. + * @return A set of sorting instructions stored in a Vector. + * @throws ParseException if something turned wrong during the parsing. To get details + * decode the message. */ - public Object clone() + private Vector parseString(String rules) + throws ParseException { - RuleBasedCollator c = (RuleBasedCollator) super.clone (); - return c; + Vector v = new Vector(); + + // result of the first subParseString is not absolute (may be -1 or a + // positive integer). But we do not care. + subParseString(false, v, 0, rules); + + return v; } /** - * This method returns an integer which indicates whether the first - * specified String is less than, greater than, or equal to - * the second. The value depends not only on the collation rules in - * effect, but also the strength and decomposition settings of this object. - * - * @param source The first String to compare. - * @param target A second String to compare to the first. + * This the the original rule string. + */ + private String rules; + + /** + * This is the table of collation element values + */ + private Object[] ce_table; + + /** + * Quick-prefix finder. + */ + HashMap prefix_tree; + + /** + * This is the value of the last sequence entered into + * ce_table. It is used to compute the + * ordering value of unspecified character. + */ + private int last_primary_value; + + /** + * This variable is true if accents need to be sorted + * in the other direction. + */ + private boolean inverseAccentComparison; + + /** + * This method uses the sorting instructions built by {@link #parseString} + * to build collation elements which can be directly used to sort strings. * - * @return A negative integer if source < target, a positive integer - * if source > target, or 0 if source == target. + * @param parsedElements Parsed instructions stored in a Vector. + * @throws ParseException if the order of the instructions are not valid. */ - public int compare (String source, String target) + private void buildCollationVector(Vector parsedElements) + throws ParseException { - CollationElementIterator cs = getCollationElementIterator (source); - CollationElementIterator ct = getCollationElementIterator (target); - - while (true) + int primary_seq = 0; + short secondary_seq = 0; + short tertiary_seq = 0; + short equality_seq = 0; + boolean inverseComparisons = false; + final boolean DECREASING = false; + final boolean INCREASING = true; + boolean secondaryType = INCREASING; + Vector v = new Vector(); + + // elts is completely sorted. +element_loop: + for (int i = 0; i < parsedElements.size(); i++) { - int os = cs.next(); - int ot = ct.next(); + CollationSorter elt = (CollationSorter) parsedElements.elementAt(i); + boolean ignoreChar = false; - // Check for end of string - if (os == CollationElementIterator.NULLORDER - && ot == CollationElementIterator.NULLORDER) + switch (elt.comparisonType) { - // Source and target string are equal. - return 0; + case CollationSorter.GREATERP: + primary_seq++; + if (inverseComparisons) + { + secondary_seq = Short.MAX_VALUE; + secondaryType = DECREASING; + } + else + { + secondary_seq = 0; + secondaryType = INCREASING; + } + tertiary_seq = 0; + equality_seq = 0; + inverseComparisons = false; + break; + case CollationSorter.GREATERS: + if (secondaryType == DECREASING) + secondary_seq--; + else + secondary_seq++; + tertiary_seq = 0; + equality_seq = 0; + break; + case CollationSorter.INVERSE_SECONDARY: + inverseComparisons = true; + continue element_loop; + case CollationSorter.GREATERT: + tertiary_seq++; + equality_seq = 0; + break; + case CollationSorter.IGNORE: + ignoreChar = true; + case CollationSorter.EQUAL: + equality_seq++; + break; + case CollationSorter.RESET: + throw new ParseException + ("Invalid reached state 'RESET'. Internal error", elt.offset); + default: + throw new ParseException + ("Invalid unknown state '" + elt.comparisonType + "'", elt.offset); } - else if (os == CollationElementIterator.NULLORDER) - { - // Source string is shorter, so return "less than". - return -1; - } - else if (ot == CollationElementIterator.NULLORDER) + + CollationElement e; + + if (!ignoreChar) { - // Target string is shorter, so return "greater than". - return 1; + e = new CollationElement(elt.textElement, primary_seq, + secondary_seq, tertiary_seq, + equality_seq, elt.expansionOrdering); } + else + e = new CollationElement(elt.textElement); - // We know chars are totally equal, so skip - if (os == ot) - continue; + v.add(e); + } - // Check for primary strength differences - int prim1 = cs.primaryOrder (os); - int prim2 = ct.primaryOrder (ot); + this.inverseAccentComparison = inverseComparisons; - if (prim1 < prim2) - return -1; - else if (prim1 > prim2) - return 1; - else if (getStrength() == PRIMARY) - continue; + ce_table = v.toArray(); - // Check for secondary strength differences - int sec1 = cs.secondaryOrder (os); - int sec2 = ct.secondaryOrder (ot); + last_primary_value = primary_seq+1; + } - if (sec1 < sec2) - return -1; - else if (sec1 > sec2) - return 1; - else if (getStrength() == SECONDARY) - continue; + /** + * Build a tree where all keys are the texts of collation elements and data is + * the collation element itself. The tree is used when extracting all prefix + * for a given text. + */ + private void buildPrefixAccess() + { + prefix_tree = new HashMap(); - // Check for tertiary differences - int tert1 = cs.tertiaryOrder (os); - int tert2 = ct.tertiaryOrder (ot); + for (int i = 0; i < ce_table.length; i++) + { + CollationElement e = (CollationElement) ce_table[i]; - if (tert1 < tert2) - return -1; - else if (tert1 > tert2) - return 1; + prefix_tree.put(e.char_seq, e); } } /** - * This method tests this object for equality against the specified - * object. This will be true if and only if the specified object is - * another reference to this object. + * This method initializes a new instance of RuleBasedCollator + * with the specified collation rules. Note that an application normally + * obtains an instance of RuleBasedCollator by calling the + * getInstance method of Collator. That method + * automatically loads the proper set of rules for the desired locale. * - * @param obj The Object to compare against this object. + * @param rules The collation rule string. * - * @return true if the specified object is equal to this object, false otherwise. + * @exception ParseException If the rule string contains syntax errors. */ - public boolean equals (Object obj) + public RuleBasedCollator(String rules) throws ParseException { - if (obj == this) - return true; + this.rules = rules; - return false; + if (rules.equals("")) + throw new ParseException("Empty rule set", 0); + + buildCollationVector(parseString(rules)); + buildPrefixAccess(); + } + + /** + * This method returns a String containing the collation rules + * for this object. + * + * @return The collation rules for this object. + */ + public String getRules() + { + return rules; + } + + /** + * This method builds a default collation element without invoking + * the database created from the rules passed to the constructor. + * + * @param c Character which needs a collation element. + * @return A valid brand new CollationElement instance. + */ + CollationElement getDefaultElement(char c) + { + int v; + + // Preliminary support for generic accent sorting inversion (I don't know if all + // characters in the range should be sorted backward). This is the place + // to fix this if needed. + if (inverseAccentComparison && (c >= 0x02B9 && c <= 0x0361)) + v = 0x0361 - ((int)c - 0x02B9); + else + v = (short)c; + return new CollationElement(""+c, last_primary_value + v, + (short)0, (short)0, (short) 0, null); } /** @@ -403,35 +733,122 @@ * for the specified String under the collation rules for this * object. * - * @param source The String to return the CollationElementIterator instance for. + * @param str The String to return the CollationElementIterator instance for. * * @return A CollationElementIterator for the specified String. */ - public CollationElementIterator getCollationElementIterator (String source) + public CollationElementIterator getCollationElementIterator(String str) { - return new CollationElementIterator (source, this); - } + return new CollationElementIterator(this, str); + } /** * This method returns an instance of CollationElementIterator * for the String represented by the specified * CharacterIterator. * - * @param source The CharacterIterator with the desired String. + * @param ci The CharacterIterator with the desired String. * * @return A CollationElementIterator for the specified String. */ - public CollationElementIterator getCollationElementIterator (CharacterIterator source) + public CollationElementIterator getCollationElementIterator(CharacterIterator ci) { - StringBuffer sb = new StringBuffer(); + StringBuffer sb = new StringBuffer(""); // Right now we assume that we will read from the beginning of the string. - for (char c = source.first(); c != CharacterIterator.DONE; c = source.next()) + char c = ci.first(); + while (c != CharacterIterator.DONE) { - sb.append (c); + sb.append(c); + c = ci.next(); } - return getCollationElementIterator (sb.toString()); + return getCollationElementIterator(sb.toString()); + } + + /** + * This method returns an integer which indicates whether the first + * specified String is less than, greater than, or equal to + * the second. The value depends not only on the collation rules in + * effect, but also the strength and decomposition settings of this object. + * + * @param s1 The first String to compare. + * @param s2 A second String to compare to the first. + * + * @return A negative integer if s1 < s2, a positive integer + * if s1 > s2, or 0 if s1 == s2. + */ + public int compare(String s1, String s2) + { + CollationElementIterator cei1 = getCollationElementIterator(s1); + CollationElementIterator cei2 = getCollationElementIterator(s2); + + for(;;) + { + CollationElement ord1block = cei1.nextBlock(); + CollationElement ord2block = cei2.nextBlock(); + int ord1; + int ord2; + + if (ord1block != null) + ord1 = ord1block.getValue(); + else + { + if (ord2block == null) + return 0; + return -1; + } + + if (ord2block == null) + return 1; + + ord2 = ord2block.getValue(); + + // We know chars are totally equal, so skip + if (ord1 == ord2) + { + if (getStrength() == IDENTICAL) + if (!ord1block.char_seq.equals(ord2block.char_seq)) + return ord1block.char_seq.compareTo(ord2block.char_seq); + continue; + } + + // Check for primary strength differences + int prim1 = cei1.primaryOrder(ord1); + int prim2 = cei2.primaryOrder(ord2); + + if (prim1 < prim2) + return -1; + else if (prim1 > prim2) + return 1; + else if (getStrength() == PRIMARY) + continue; + + // Check for secondary strength differences + int sec1 = cei1.secondaryOrder(ord1); + int sec2 = cei2.secondaryOrder(ord2); + + if (sec1 < sec2) + return -1; + else if (sec1 > sec2) + return 1; + else if (getStrength() == SECONDARY) + continue; + + // Check for tertiary differences + int tert1 = cei1.tertiaryOrder(ord1); + int tert2 = cei2.tertiaryOrder(ord2); + + if (tert1 < tert2) + return -1; + else if (tert1 > tert2) + return 1; + else if (getStrength() == TERTIARY) + continue; + + // Apparently JDK does this (at least for my test case). + return ord1block.char_seq.compareTo(ord2block.char_seq); + } } /** @@ -441,14 +858,14 @@ * provide speed benefits if multiple comparisons are performed, such * as during a sort. * - * @param source The String to create a CollationKey for. + * @param str The String to create a CollationKey for. * * @return A CollationKey for the specified String. */ - public CollationKey getCollationKey (String source) + public CollationKey getCollationKey(String str) { - CollationElementIterator cei = getCollationElementIterator (source); - Vector vec = new Vector (25); + CollationElementIterator cei = getCollationElementIterator(str); + Vector vect = new Vector(25); int ord = cei.next(); cei.reset(); //set to start of string @@ -458,44 +875,50 @@ switch (getStrength()) { case PRIMARY: - ord = cei.primaryOrder (ord); + ord = cei.primaryOrder(ord); break; case SECONDARY: - ord = cei.secondaryOrder (ord); + ord = cei.secondaryOrder(ord); default: break; } - vec.add (new Integer (ord)); + vect.add(new Integer(ord)); ord = cei.next(); //increment to next key } - Object[] objarr = vec.toArray(); - byte[] key = new byte [objarr.length * 4]; + Object[] objarr = vect.toArray(); + byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < objarr.length; i++) { - int j = ((Integer) objarr [i]).intValue(); - key [i * 4] = (byte) ((j & 0xFF000000) >> 24); - key [i * 4 + 1] = (byte) ((j & 0x00FF0000) >> 16); - key [i * 4 + 2] = (byte) ((j & 0x0000FF00) >> 8); - key [i * 4 + 3] = (byte) (j & 0x000000FF); + int j = ((Integer)objarr[i]).intValue(); + key [i * 4] = (byte)((j & 0xFF000000) >> 24); + key [i * 4 + 1] = (byte)((j & 0x00FF0000) >> 16); + key [i * 4 + 2] = (byte)((j & 0x0000FF00) >> 8); + key [i * 4 + 3] = (byte)(j & 0x000000FF); } - return new CollationKey (this, source, key); + return new CollationKey(this, str, key); } /** - * This method returns a String containing the collation rules - * for this object. + * This method tests this object for equality against the specified + * object. This will be true if and only if the specified object is + * another reference to this object. * - * @return The collation rules for this object. + * @param obj The Object to compare against this object. + * + * @return true if the specified object is equal to this object, false otherwise. */ - public String getRules() + public boolean equals(Object obj) { - return rules; + if (obj == this) + return true; + else + return false; } /** @@ -505,31 +928,16 @@ */ public int hashCode() { - return System.identityHashCode (this); + return System.identityHashCode(this); } /** - * This method calculates the collation element value for the specified - * character(s). + * This method creates a copy of this object. + * + * @return A copy of this object. */ - int getCollationElementValue (String source) + public Object clone() { - CollationElement e = null; - - // The table is sorted. Change to a binary search later. - for (int i = 0; i < ce_table.length; i++) - if (((CollationElement) ce_table [i]).char_seq.equals (source)) - { - e = (CollationElement) ce_table [i]; - break; - } - - if (e == null) - e = new CollationElement (source, 0xFFFF, (short)0xFF, (short)0xFF); - - int retval = (e.primary << 16) + (e.secondary << 8) + e.tertiary; - - return retval; + return super.clone(); } - -} // class RuleBaseCollator +} Index: java/text/CollationElementIterator.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/CollationElementIterator.java,v retrieving revision 1.10 diff -u -r1.10 CollationElementIterator.java --- java/text/CollationElementIterator.java 15 Oct 2003 16:05:10 -0000 1.10 +++ java/text/CollationElementIterator.java 29 Dec 2003 18:05:34 -0000 @@ -38,6 +38,11 @@ package java.text; +import java.util.Vector; +import java.util.NoSuchElementException; +import java.util.Map; +import java.util.SortedMap; + /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. * Status: Believed complete and correct to JDK 1.1. @@ -53,6 +58,7 @@ * * @author Aaron M. Renn * @author Tom Tromey + * @author Guilhem Lavaux */ public final class CollationElementIterator { @@ -73,11 +79,22 @@ private String text; /** - * This is the index into the String where we are currently scanning. + * This is the index into the collation decomposition where we are currently scanning. */ private int index; /** + * This is the index into the String where we are currently scanning. + */ + private int textIndex; + + /** + * Array containing the collation decomposition of the + * text given to the constructor. + */ + private Object[] text_decomposition; + + /** * This method initializes a new instance of CollationElementIterator * to iterate over the specified String using the rules in the * specified RuleBasedCollator. @@ -85,27 +102,73 @@ * @param collator The RuleBasedCollation used for calculating collation values * @param text The String to iterate over. */ - CollationElementIterator (String text, RuleBasedCollator collator) + CollationElementIterator(RuleBasedCollator collator, String text) { - setText (text); this.collator = collator; + + setText (text); + } + + RuleBasedCollator.CollationElement nextBlock() + { + if (index >= text_decomposition.length) + return null; + + RuleBasedCollator.CollationElement e = + (RuleBasedCollator.CollationElement) text_decomposition[index++]; + + textIndex += e.char_seq.length(); + + return e; + } + + RuleBasedCollator.CollationElement previousBlock() + { + if (index == 0) + return null; + + index--; + RuleBasedCollator.CollationElement e = + (RuleBasedCollator.CollationElement) text_decomposition[index]; + + textIndex -= e.char_seq.length(); + + return e; } /** - * This method returns the collation ordering value of the next character - * in the string. This method will return NULLORDER if the + * This method returns the collation ordering value of the next character sequence + * in the string (it may be an extended character following collation rules). + * This method will return NULLORDER if the * end of the string was reached. * * @return The collation ordering value. */ public int next() { - if (index == text.length()) + RuleBasedCollator.CollationElement e = nextBlock(); + + if (e == null) return NULLORDER; + + return e.getValue(); + } + + /** + * This method returns the collation ordering value of the previous character + * in the string. This method will return NULLORDER if the + * beginning of the string was reached. + * + * @return The collation ordering value. + */ + public int previous() + { + RuleBasedCollator.CollationElement e = previousBlock(); - String s = text.charAt (index) + ""; - index++; - return collator.getCollationElementValue (s); + if (e == null) + return NULLORDER; + + return e.getValue(); } /** @@ -116,7 +179,7 @@ * * @return The primary order value of the specified collation value. This is the high 16 bits. */ - public static final int primaryOrder (int order) + public static final int primaryOrder(int order) { // From the JDK 1.2 spec. return order >>> 16; @@ -129,6 +192,7 @@ public void reset() { index = 0; + textIndex = 0; } /** @@ -139,7 +203,7 @@ * * @return The secondary order value of the specified collation value. This is the bits 8-15. */ - public static final short secondaryOrder (int order) + public static final short secondaryOrder(int order) { // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255); @@ -153,7 +217,7 @@ * * @return The tertiary order value of the specified collation value. This is the low eight bits. */ - public static final short tertiaryOrder (int order) + public static final short tertiaryOrder(int order) { // From the JDK 1.2 spec. return (short) (order & 255); @@ -163,14 +227,70 @@ * This method sets the String that it is iterating over * to the specified String. * - * @param text The new String to iterate over. - * - * @since 1.2 + * @param The new String to iterate over. */ - public void setText (String text) + public void setText(String text) { + int idx = 0; + this.text = text; index = 0; + + String work_text = text.intern(); + + Vector v = new Vector(); + // Build element collection ordered as they come in "text". + while (idx < work_text.length()) + { + String key, key_old; + + Object object = null; + int p = 1; + + // IMPROVE: use a TreeMap with a prefix-ordering rule. + key_old = key = null; + do + { + if (object != null) + key_old = key; + key = work_text.substring (idx, idx+p); + object = collator.prefix_tree.get (key); + p++; + } + while (idx+p <= work_text.length()); + + if (object == null) + key = key_old; + + RuleBasedCollator.CollationElement prefix = + (RuleBasedCollator.CollationElement) collator.prefix_tree.get (key); + + if (prefix == null) + { + RuleBasedCollator.CollationElement e = + collator.getDefaultElement(work_text.charAt (idx)); + + v.add (e); + idx++; + continue; + } + + if (prefix.expansion != null) + { + work_text = prefix.expansion + + work_text.substring (idx+prefix.char_seq.length()); + idx = 0; + v.add (prefix); + } + else + { + if (!prefix.ignore) + v.add (prefix); + idx += prefix.char_seq.length(); + } + } + + text_decomposition = v.toArray(); } /** @@ -180,19 +300,19 @@ * * @param ci The CharacterIterator containing the new String to iterate over. */ - public void setText (CharacterIterator ci) + public void setText(CharacterIterator ci) { + StringBuffer sb = new StringBuffer(""); + // For now assume we read from the beginning of the string. char c = ci.first(); - StringBuffer sb = new StringBuffer (""); - while (c != CharacterIterator.DONE) { - sb.append (c); + sb.append(c); c = ci.next(); } - setText (sb.toString()); + setText(sb.toString()); } /** @@ -200,12 +320,10 @@ * that is being iterated over. * * @return The iteration index position. - * - * @since 1.2 */ public int getOffset() { - return index; + return textIndex; } /** @@ -218,18 +336,28 @@ * * @exception IllegalArgumentException If the new offset is not valid. */ - public void setOffset (int offset) + public void setOffset(int offset) { if (offset < 0) - throw new IllegalArgumentException ("Negative offset: " + offset); + throw new IllegalArgumentException("Negative offset: " + offset); - if ((text.length () > 0) && (offset > 0)) - throw new IllegalArgumentException ("Offset too large: " + offset); - else if (offset > (text.length () - 1)) - throw new IllegalArgumentException ("Offset too large: " + offset); + if ((text.length() > 0) && (offset > 0)) + throw new IllegalArgumentException("Offset too large: " + offset); + else if (offset > (text.length() - 1)) + throw new IllegalArgumentException("Offset too large: " + offset); - index = offset; - } + textIndex = 0; + for (int i=0;i offset) + break; + textIndex = idx; + } + } /** * This method returns the maximum length of any expansion sequence that @@ -239,28 +367,8 @@ * * @param The maximum length of an expansion sequence. */ - public int getMaxExpansion (int value) + public int getMaxExpansion(int value) { - //************ Implement me!!!!!!!!! - return 5; + return 1; } - - /** - * This method returns the collation ordering value of the previous character - * in the string. This method will return NULLORDER if the - * beginning of the string was reached. - * - * @return The collation ordering value. - */ - public int previous() - { - --index; - if (index < 0) - return NULLORDER; - - String s = text.charAt (index) + ""; - return collator.getCollationElementValue (s); - } - -} // class CollationElementIterator - +} --------------080904020500030903070703-- From MAILER-DAEMON Tue Dec 30 06:42:34 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbIGf-00054E-Nl for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 06:42:33 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbIGc-00053f-RZ for commit-classpath@gnu.org; Tue, 30 Dec 2003 06:42:30 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbIG5-0004yI-8v for commit-classpath@gnu.org; Tue, 30 Dec 2003 06:42:29 -0500 Received: from [212.6.122.116] (helo=mail2.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbIFu-0004xa-7s for commit-classpath@gnu.org; Tue, 30 Dec 2003 06:41:46 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-83-199.ewetel.net [80.228.83.199]) by mail2.ewetel.de (8.12.1/8.12.9) with ESMTP id hBUAdUUa005191; Tue, 30 Dec 2003 11:39:31 +0100 (MET) Received: from mkoch by majestix.konqueror.de with local (Exim 3.35 #1 (Debian)) id 1AbHLA-0004sz-00; Tue, 30 Dec 2003 11:43:08 +0100 Date: Tue, 30 Dec 2003 11:43:08 +0100 From: Michael Koch To: Guilhem Lavaux Message-ID: <20031230104308.GA18753@mail.konqueror.de> References: <3FF0181B.7080200@kaffe.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FF0181B.7080200@kaffe.org> User-Agent: Mutt/1.3.28i Sender: Michael Koch X-CheckCompat: OK Cc: commit-classpath@gnu.org Subject: Re: FYI: java.util.GregorianCalendar and java.net.URLStreamHandler X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 11:42:31 -0000 On Mon, Dec 29, 2003 at 01:03:39PM +0100, Guilhem Lavaux wrote: > Hi, > > Here are two small fixes: one from Ito about DAY_OF_WEEK_IN_MONTH and > another to fix relative path which should be transformed into absolute > in URLs. Why do you commit two totally independant things in one commit ? > // Or this is an absolute path name; ignore any file context. > file = spec.substring(start, end); > + if (start < end && spec.charAt(start) != '/') > + file = "/" + file; > ref = null; > } Why is this patch actually needed ? It changed nothing for libgcj when I tried it. Michael From MAILER-DAEMON Tue Dec 30 07:39:15 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbJ9X-0006Dx-5G for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 07:39:15 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbJ9K-0006AZ-So for commit-classpath@gnu.org; Tue, 30 Dec 2003 07:39:02 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbJ8m-0005xU-Ax for commit-classpath@gnu.org; Tue, 30 Dec 2003 07:38:59 -0500 Received: from [62.4.16.102] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbJ8l-0005wo-NG for commit-classpath@gnu.org; Tue, 30 Dec 2003 07:38:27 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 0A2D1418E0; Tue, 30 Dec 2003 12:36:59 +0100 (CET) Message-ID: <3FF16378.8040106@kaffe.org> Date: Tue, 30 Dec 2003 12:37:28 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Koch , commit-classpath@gnu.org References: <3FF0181B.7080200@kaffe.org> <20031230104308.GA18753@mail.konqueror.de> In-Reply-To: <20031230104308.GA18753@mail.konqueror.de> X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: FYI: java.util.GregorianCalendar and java.net.URLStreamHandler X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 12:39:08 -0000 Michael Koch wrote: >On Mon, Dec 29, 2003 at 01:03:39PM +0100, Guilhem Lavaux wrote: > > >>Hi, >> >>Here are two small fixes: one from Ito about DAY_OF_WEEK_IN_MONTH and >>another to fix relative path which should be transformed into absolute >>in URLs. >> >> > >Why do you commit two totally independant things in one commit ? > > > The patch was sufficiently small to be put in only one piece. Apparently, I shouldn't have to... >> // Or this is an absolute path name; ignore any file context. >> file = spec.substring(start, end); >>+ if (start < end && spec.charAt(start) != '/') >>+ file = "/" + file; >> ref = null; >> } >> >> > >Why is this patch actually needed ? It changed nothing for libgcj when I >tried it. > > > > It fixes three tests on kaffe (two in URLTest and one in newURL). I'm rechecking gcj... Guilhem. From MAILER-DAEMON Tue Dec 30 07:48:13 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbJID-000202-3G for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 07:48:13 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbJIA-0001yX-4t for commit-classpath@gnu.org; Tue, 30 Dec 2003 07:48:10 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbJHc-0001iQ-2m for commit-classpath@gnu.org; Tue, 30 Dec 2003 07:48:07 -0500 Received: from [62.4.16.102] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbJHb-0001iN-Pq for commit-classpath@gnu.org; Tue, 30 Dec 2003 07:47:35 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 722F1418B5; Tue, 30 Dec 2003 12:46:07 +0100 (CET) Message-ID: <3FF1659C.6040505@kaffe.org> Date: Tue, 30 Dec 2003 12:46:36 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Guilhem Lavaux References: <3FF0181B.7080200@kaffe.org> <20031230104308.GA18753@mail.konqueror.de> <3FF16378.8040106@kaffe.org> In-Reply-To: <3FF16378.8040106@kaffe.org> X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: commit-classpath@gnu.org, Michael Koch Subject: Re: FYI: java.util.GregorianCalendar and java.net.URLStreamHandler X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 12:48:11 -0000 Guilhem Lavaux wrote: > Michael Koch wrote: > >> On Mon, Dec 29, 2003 at 01:03:39PM +0100, Guilhem Lavaux wrote: >> >> >>> Hi, >>> >>> Here are two small fixes: one from Ito about DAY_OF_WEEK_IN_MONTH >>> and another to fix relative path which should be transformed into >>> absolute in URLs. >>> >> >> >> Why do you commit two totally independant things in one commit ? >> >> >> > The patch was sufficiently small to be put in only one piece. > Apparently, I shouldn't have to... > >>> // Or this is an absolute path name; ignore any file context. >>> file = spec.substring(start, end); >>> + if (start < end && spec.charAt(start) != '/') >>> + file = "/" + file; >>> ref = null; >>> } >> >> >> Why is this patch actually needed ? It changed nothing for libgcj when I >> tried it. >> >> >> >> > It fixes three tests on kaffe (two in URLTest and one in newURL). I'm > rechecking gcj... > > Guilhem. > I think the bug was in kaffe's version of File. I'm rechecking this and will reverse the patch if it's the case. Guilhm. From MAILER-DAEMON Tue Dec 30 08:22:03 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbJox-0002HA-4w for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 08:22:03 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbJot-0002FV-LH for commit-classpath@gnu.org; Tue, 30 Dec 2003 08:21:59 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbJnI-0001gI-EV for commit-classpath@gnu.org; Tue, 30 Dec 2003 08:20:53 -0500 Received: from [212.6.122.126] (helo=mail3.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbJmy-0001Jl-KH for commit-classpath@gnu.org; Tue, 30 Dec 2003 08:20:00 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-83-199.ewetel.net [80.228.83.199]) by mail3.ewetel.de (8.12.1/8.12.9) with ESMTP id hBUCIV1h010795 for ; Tue, 30 Dec 2003 13:18:31 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AbIt0-0005BU-00 for ; Tue, 30 Dec 2003 13:22:10 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Tue, 30 Dec 2003 13:21:37 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_R3W8/NM34TlSl2O" Message-Id: <200312301321.38056.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: gnu.java.net.protocol.http.Connection X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 13:22:00 -0000 --Boundary-00=_R3W8/NM34TlSl2O Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to add back request property support. Michael --Boundary-00=_R3W8/NM34TlSl2O Content-Type: text/x-diff; charset="us-ascii"; name="rp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="rp.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1734 diff -u -b -B -r1.1734 ChangeLog --- ChangeLog 28 Dec 2003 21:50:38 -0000 1.1734 +++ ChangeLog 30 Dec 2003 12:15:16 -0000 @@ -1,3 +1,12 @@ +2003-12-30 Michael Koch + + * gnu/java/net/protocol/http/Connection.java + (requestProperties): New field. + (addRequestProperty): New method. + (getRequestProperty): New method. + (setRequestProperty): New method. + (getRequestProperties): New method. + 2003-12-28 Michael Koch * gnu/java/net/HeaderFieldHelper.java Index: gnu/java/net/protocol/http/Connection.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/Connection.java,v retrieving revision 1.11 diff -u -b -B -r1.11 Connection.java --- gnu/java/net/protocol/http/Connection.java 28 Dec 2003 21:50:38 -0000 1.11 +++ gnu/java/net/protocol/http/Connection.java 30 Dec 2003 12:15:16 -0000 @@ -52,6 +52,7 @@ import java.net.Socket; import java.net.URL; import java.net.URLConnection; +import java.util.HashMap; import java.util.Iterator; import java.util.Map; import gnu.java.net.HeaderFieldHelper; @@ -119,6 +120,11 @@ private ByteArrayOutputStream bufferedOutputStream; /** + * This object holds the request properties. + */ + private HashMap requestProperties = new HashMap(); + + /** * This is the object that holds the header field information */ private HeaderFieldHelper headers = new HeaderFieldHelper(); @@ -408,6 +414,41 @@ else throw new ProtocolException ("Unsupported or unknown request method " + method); + } + + public void addRequestProperty(String key, String value) + { + if (connected) + throw new IllegalStateException("Already connected"); + + String old = (String) requestProperties.put(key, value); + + if (old != null) + requestProperties.put(key, old + "," + value); + } + + public String getRequestProperty(String key) + { + if (connected) + throw new IllegalStateException("Already connected"); + + return (String) requestProperties.get(key); + } + + public void setRequestProperty(String key, String value) + { + if (connected) + throw new IllegalStateException("Already connected"); + + requestProperties.put(key, value); + } + + public Map getRequestProperties() + { + if (connected) + throw new IllegalStateException("Already connected"); + + return requestProperties; } public String getHeaderField(String name) --Boundary-00=_R3W8/NM34TlSl2O-- From MAILER-DAEMON Tue Dec 30 08:37:58 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbK4L-0000cx-Pa for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 08:37:57 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbK4I-0000cI-Sl for commit-classpath@gnu.org; Tue, 30 Dec 2003 08:37:54 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbK3m-0000RO-4L for commit-classpath@gnu.org; Tue, 30 Dec 2003 08:37:53 -0500 Received: from [212.6.122.141] (helo=mail4.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbK3l-0000OR-Fr for commit-classpath@gnu.org; Tue, 30 Dec 2003 08:37:21 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-83-199.ewetel.net [80.228.83.199]) by mail4.ewetel.de (8.12.1/8.12.9) with ESMTP id hBUCZnHA023982 for ; Tue, 30 Dec 2003 13:35:50 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AbJ9k-0005Cc-00 for ; Tue, 30 Dec 2003 13:39:28 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Tue, 30 Dec 2003 13:38:56 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_gHX8/18b1wjO3Kb" Message-Id: <200312301338.56826.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.net.URLConnection X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 13:37:56 -0000 --Boundary-00=_gHX8/18b1wjO3Kb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to remove the header field and request property from java.net.URLConnection. This stuff needs to be implemented in the according subclass (which is already done). Michael --Boundary-00=_gHX8/18b1wjO3Kb Content-Type: text/x-diff; charset="us-ascii"; name="url.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="url.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1734 diff -u -b -B -r1.1734 ChangeLog --- ChangeLog 28 Dec 2003 21:50:38 -0000 1.1734 +++ ChangeLog 30 Dec 2003 12:27:43 -0000 @@ -1,3 +1,16 @@ +2003-12-30 Michael Koch + + * java/net/URLConnection.java + (req_props): Removed. + (getHeaderField): Do nothing here. Implementation has to be in + subclass. + (setRequestProperty): Likewise. + (addRequestProperty): Likewise. + (getRequestProperty): Likewise. + (getRequestProperties): Likewise. + (setDefaultRequestProperty): Likewise. + (getDefaultRequestProperty): Likewise. + 2003-12-28 Michael Koch * gnu/java/net/HeaderFieldHelper.java Index: java/net/URLConnection.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/URLConnection.java,v retrieving revision 1.19 diff -u -b -B -r1.19 URLConnection.java --- java/net/URLConnection.java 12 Oct 2003 17:24:37 -0000 1.19 +++ java/net/URLConnection.java 30 Dec 2003 12:27:43 -0000 @@ -160,10 +160,6 @@ */ protected URL url; - /** - * The list of request properties for this connection - */ - private final Hashtable req_props; /** * Creates a URL connection to a given URL. A real connection is not made. @@ -179,7 +175,6 @@ this.url = url; allowUserInteraction = defaultAllowUserInteraction; useCaches = defaultUseCaches; - req_props = new Hashtable(); } /** @@ -298,15 +293,8 @@ */ public String getHeaderField(String name) { - for (int i = 0; ; i++) - { - String key = getHeaderFieldKey(i); - if (key == null) - return(null); - - if (key.toLowerCase().equals(name.toLowerCase())) - return(getHeaderField(i)); - } + // Subclasses for specific protocols override this. + return null; } /** @@ -746,7 +734,8 @@ if (key == null) throw new NullPointerException ("key is null"); - req_props.put (key.toLowerCase(), value); + // Do nothing unless overridden by subclasses that support setting + // header fields in the request. } /** @@ -772,10 +761,8 @@ if (key == null) throw new NullPointerException ("key is null"); - if (getRequestProperty (key) == null) - { - setRequestProperty (key, value); - } + // Do nothing unless overridden by subclasses that support adding + // header fields in the request. } /** @@ -795,7 +782,9 @@ if (connected) throw new IllegalStateException ("Already connected"); - return((String)req_props.get(key.toLowerCase())); + // Overridden by subclasses that support reading header fields from the + // request. + return null; } /** @@ -812,7 +801,9 @@ if (connected) throw new IllegalStateException ("Already connected"); - return Collections.unmodifiableMap(req_props); + // Overridden by subclasses that support reading header fields from the + // request. + return Collections.EMPTY_MAP; } /** @@ -823,9 +814,10 @@ * @param key The request property name the default is being set for * @param value The value to set the default to * - * @deprecated 1.3 The method setRequestProperty should be used instead + * @deprecated 1.3 The method setRequestProperty should be used instead. + * This method does nothing now. * - * @see URLConnectionr#setRequestProperty(String key, String value) + * @see URLConnection#setRequestProperty(String key, String value) */ public static void setDefaultRequestProperty (String key, String value) { @@ -841,11 +833,12 @@ * * @return The value of the default property or null if not available * - * @deprecated 1.3 The method getRequestProperty should be used instead + * @deprecated 1.3 The method getRequestProperty should be used instead. + * This method does nothing now. * * @see URLConnection#getRequestProperty(String key) */ - public static String getDefaultRequestProperty (String key) + public static String getDefaultRequestProperty(String key) { // This method does nothing since JDK 1.3. return null; --Boundary-00=_gHX8/18b1wjO3Kb-- From MAILER-DAEMON Tue Dec 30 15:02:55 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbQ4s-0001Hv-Ss for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 15:02:54 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbQ4q-0001HM-J7 for commit-classpath@gnu.org; Tue, 30 Dec 2003 15:02:52 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbQ4J-0000o0-KU for commit-classpath@gnu.org; Tue, 30 Dec 2003 15:02:50 -0500 Received: from [62.4.16.102] (helo=kraid.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbQ4J-0000nw-6b for commit-classpath@gnu.org; Tue, 30 Dec 2003 15:02:19 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by kraid.nerim.net (Postfix) with ESMTP id 51FB340E85 for ; Tue, 30 Dec 2003 20:00:49 +0100 (CET) Message-ID: <3FF1CB7D.6060803@kaffe.org> Date: Tue, 30 Dec 2003 20:01:17 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040306020400010906070701" Subject: FYI: java.net.URL and java.net.URLStreamHandler X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 20:02:53 -0000 This is a multi-part message in MIME format. --------------040306020400010906070701 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Finally here is the patch which should solve the problems encountered with URLs concerning relative path transformed into absolute path. I'll commit it tomorrow. I've corrected some mauve tests to make them pass with JDK and follow more closely the spec. Guilhem. --------------040306020400010906070701 Content-Type: text/plain; name="patch_url" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_url" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1737 diff -u -r1.1737 ChangeLog --- ChangeLog 29 Dec 2003 21:50:35 -0000 1.1737 +++ ChangeLog 30 Dec 2003 18:57:02 -0000 @@ -1,3 +1,11 @@ +2003-12-30 Guilhem Lavaux + + * java/net/URLStreamHandler.java + (parseURL): Leave path relative in any case. + + * java/net/URL.java + (URL): Change context path to "/" if it is empty. + 2003-12-29 Guilhem Lavaux * java/text/RuleBasedCollator.java, Index: java/net/URL.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/URL.java,v retrieving revision 1.24 diff -u -r1.24 URL.java --- java/net/URL.java 25 Dec 2003 16:36:55 -0000 1.24 +++ java/net/URL.java 30 Dec 2003 18:57:02 -0000 @@ -396,6 +396,8 @@ host = context.host; port = context.port; file = context.file; + if (file == null || file.length() == 0) + file = "/"; authority = context.authority; } } @@ -408,6 +410,8 @@ host = context.host; port = context.port; file = context.file; + if (file == null || file.length() == 0) + file = "/"; authority = context.authority; } else // Protocol NOT specified in spec. and no context available. Index: java/net/URLStreamHandler.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/URLStreamHandler.java,v retrieving revision 1.23 diff -u -r1.23 URLStreamHandler.java --- java/net/URLStreamHandler.java 29 Dec 2003 12:04:50 -0000 1.23 +++ java/net/URLStreamHandler.java 30 Dec 2003 18:57:02 -0000 @@ -186,8 +186,6 @@ // No file context available; just spec for file. // Or this is an absolute path name; ignore any file context. file = spec.substring(start, end); - if (start < end && spec.charAt(start) != '/') - file = "/" + file; ref = null; } else if (start < end) --------------040306020400010906070701-- From MAILER-DAEMON Tue Dec 30 18:01:45 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbSrw-00029p-Rl for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 18:01:44 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbSrs-00028G-Ob for commit-classpath@gnu.org; Tue, 30 Dec 2003 18:01:40 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbSrI-0001xX-Tk for commit-classpath@gnu.org; Tue, 30 Dec 2003 18:01:36 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbSrI-0001wz-5Q for commit-classpath@gnu.org; Tue, 30 Dec 2003 18:01:04 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-83-199.ewetel.net [80.228.83.199]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBULxY9u028339 for ; Tue, 30 Dec 2003 22:59:35 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AbRxM-0006r3-00 for ; Tue, 30 Dec 2003 23:03:16 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Tue, 30 Dec 2003 23:02:40 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_AYf8/5e0FruhPKj" Message-Id: <200312302302.40595.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.nio.channels.Channels X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 23:01:42 -0000 --Boundary-00=_AYf8/5e0FruhPKj Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I commited the attached patch to implement some helper methods in java.nio.channels.Channels. Michael --Boundary-00=_AYf8/5e0FruhPKj Content-Type: text/x-diff; charset="us-ascii"; name="nio.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="nio.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1740 diff -u -b -B -r1.1740 ChangeLog --- ChangeLog 30 Dec 2003 15:57:05 -0000 1.1740 +++ ChangeLog 30 Dec 2003 21:28:45 -0000 @@ -1,5 +1,17 @@ 2003-12-30 Michael Koch + * java/nio/channels/Channels.java + (newInputStream): Implemented. + (newOuputStream): Implemented. + (newChannel): Implemented. + * gnu/java/nio/ChannelInputStream.java, + gnu/java/nio/ChannelOutputStream.java, + gnu//java/nio/InputStreamChannel.java, + gnu/java/nio/OutputStreamChannel.java: New files. + * gnu/java/nio/Makefile.am (EXTRA_DIST): Added new files. + +2003-12-30 Michael Koch + * java/io/ObjectStreamClass.java (getSerialPersistentFields): Little reformating. Index: java/nio/channels/Channels.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/channels/Channels.java,v retrieving revision 1.5 diff -u -b -B -r1.5 Channels.java --- java/nio/channels/Channels.java 11 Jun 2003 15:15:08 -0000 1.5 +++ java/nio/channels/Channels.java 30 Dec 2003 21:28:45 -0000 @@ -1,5 +1,5 @@ /* Channels.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -37,6 +37,10 @@ package java.nio.channels; +import gnu.java.nio.ChannelInputStream; +import gnu.java.nio.ChannelOutputStream; +import gnu.java.nio.InputStreamChannel; +import gnu.java.nio.OutputStreamChannel; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; @@ -53,33 +57,33 @@ /** * Constructs a stream that reads bytes from the given channel. */ - public static InputStream newInputStream (ReadableByteChannel ch) + public static InputStream newInputStream(ReadableByteChannel ch) { - throw new Error ("not implemented"); + return new ChannelInputStream(ch); } /** * Constructs a stream that writes bytes to the given channel. */ - public static OutputStream newOutputStream (WritableByteChannel ch) + public static OutputStream newOutputStream(WritableByteChannel ch) { - throw new Error ("not implemented"); + return new ChannelOutputStream(ch); } /** * Constructs a channel that reads bytes from the given stream. */ - public static ReadableByteChannel newChannel (InputStream in) + public static ReadableByteChannel newChannel(InputStream in) { - throw new Error ("not implemented"); + return new InputStreamChannel(in); } /** * Constructs a channel that writes bytes to the given stream. */ - public static WritableByteChannel newChannel (OutputStream out) + public static WritableByteChannel newChannel(OutputStream out) { - throw new Error ("not implemented"); + return new OutputStreamChannel (out); } /** Index: gnu/java/nio/Makefile.am =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/nio/Makefile.am,v retrieving revision 1.11 diff -u -b -B -r1.11 Makefile.am --- gnu/java/nio/Makefile.am 15 Oct 2003 13:11:47 -0000 1.11 +++ gnu/java/nio/Makefile.am 30 Dec 2003 21:28:45 -0000 @@ -1,9 +1,13 @@ SUBDIRS = charset EXTRA_DIST= \ +ChannelInputStream.java \ +ChannelOutputStream.java \ DatagramChannelImpl.java \ DatagramChannelSelectionKey.java \ FileLockImpl.java \ +InputStreamChannel.java \ +OutputStreamChannel.java \ PipeImpl.java \ NIOConstants.java \ NIODatagramSocket.java \ Index: gnu/java/nio/ChannelInputStream.java =================================================================== RCS file: gnu/java/nio/ChannelInputStream.java diff -N gnu/java/nio/ChannelInputStream.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/java/nio/ChannelInputStream.java 30 Dec 2003 21:28:45 -0000 @@ -0,0 +1,79 @@ +/* ChannelInputStream.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.nio; + +import java.io.InputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.IllegalBlockingModeException; +import java.nio.channels.ReadableByteChannel; +import java.nio.channels.SelectableChannel; + +/** + * @author Michael Koch + */ +public final class ChannelInputStream extends InputStream +{ + private ReadableByteChannel ch; + + public ChannelInputStream (ReadableByteChannel ch) + { + super(); + + this.ch = ch; + } + + public int read() throws IOException + { + if (ch instanceof SelectableChannel + && (! ((SelectableChannel) ch).isBlocking())) + throw new IllegalBlockingModeException(); + + ByteBuffer buffer = ByteBuffer.allocate(1); + int result = ch.read(buffer); + + if (result == -1) + return -1; + + if (result == 0) + throw new IOException("Could not read from channel"); + + return buffer.get(0); + } +} Index: gnu/java/nio/ChannelOutputStream.java =================================================================== RCS file: gnu/java/nio/ChannelOutputStream.java diff -N gnu/java/nio/ChannelOutputStream.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/java/nio/ChannelOutputStream.java 30 Dec 2003 21:28:45 -0000 @@ -0,0 +1,67 @@ +/* ChannelOutputStream.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.nio; + +import java.io.OutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.WritableByteChannel; + +/** + * @author Michael Koch + */ +public final class ChannelOutputStream extends OutputStream +{ + private WritableByteChannel ch; + + public ChannelOutputStream (WritableByteChannel ch) + { + super(); + + this.ch = ch; + } + + public void write (int value) throws IOException + { + ByteBuffer buffer = ByteBuffer.allocate (1); + buffer.put ((byte) (value & 0xff)); + buffer.flip(); + ch.write (buffer); + } +} Index: gnu/java/nio/OutputStreamChannel.java =================================================================== RCS file: gnu/java/nio/OutputStreamChannel.java diff -N gnu/java/nio/OutputStreamChannel.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/java/nio/OutputStreamChannel.java 30 Dec 2003 21:28:45 -0000 @@ -0,0 +1,87 @@ +/* OutputStreamChannel.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.nio; + +import java.io.OutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.ClosedChannelException; +import java.nio.channels.WritableByteChannel; + +/** + * @author Michael Koch + */ +public final class OutputStreamChannel implements WritableByteChannel +{ + private boolean closed = false; + private OutputStream out; + + public OutputStreamChannel (OutputStream out) + { + super(); + + this.out = out; + } + + public void close() throws IOException + { + if (!closed) + { + out.close(); + closed = true; + } + } + + public boolean isOpen() + { + return !closed; + } + + public int write (ByteBuffer src) throws IOException + { + if (!isOpen()) + throw new ClosedChannelException(); + + int len = src.remaining(); + byte[] buffer = new byte [len]; + src.get (buffer); + out.write (buffer); + return len; + } +} Index: gnu//java/nio/InputStreamChannel.java =================================================================== RCS file: gnu//java/nio/InputStreamChannel.java diff -N gnu//java/nio/InputStreamChannel.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu//java/nio/InputStreamChannel.java 30 Dec 2003 21:28:45 -0000 @@ -0,0 +1,88 @@ +/* InputStreamChannel.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.nio; + +import java.io.InputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.ClosedChannelException; +import java.nio.channels.ReadableByteChannel; + +/** + * @author Michael Koch + */ +public final class InputStreamChannel implements ReadableByteChannel +{ + private boolean closed = false; + private InputStream in; + + public InputStreamChannel (InputStream in) + { + super(); + this.in = in; + } + + public void close() throws IOException + { + if (!closed) + { + in.close(); + closed = true; + } + } + + public boolean isOpen() + { + return !closed; + } + + public int read (ByteBuffer dst) throws IOException + { + if (!isOpen()) + throw new ClosedChannelException(); + + byte[] buffer = new byte [dst.remaining()]; + int readBytes = in.read (buffer); + + if (readBytes > 0) + dst.put (buffer, 0, readBytes); + + return readBytes; + } +} --Boundary-00=_AYf8/5e0FruhPKj-- From MAILER-DAEMON Tue Dec 30 18:22:37 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbTC9-0002DG-3P for mharc-commit-classpath@gnu.org; Tue, 30 Dec 2003 18:22:37 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbTC7-0002CK-1Z for commit-classpath@gnu.org; Tue, 30 Dec 2003 18:22:35 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbTBa-00028i-2W for commit-classpath@gnu.org; Tue, 30 Dec 2003 18:22:33 -0500 Received: from [212.6.122.106] (helo=mail1.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbTBZ-00028Z-LU for commit-classpath@gnu.org; Tue, 30 Dec 2003 18:22:01 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-83-199.ewetel.net [80.228.83.199]) by mail1.ewetel.de (8.12.1/8.12.9) with ESMTP id hBUMK1l1011213; Tue, 30 Dec 2003 23:20:01 +0100 (MET) Received: from mkoch by majestix.konqueror.de with local (Exim 3.35 #1 (Debian)) id 1AbSH8-0006s8-00; Tue, 30 Dec 2003 23:23:42 +0100 Date: Tue, 30 Dec 2003 23:23:42 +0100 From: Michael Koch To: Guilhem Lavaux Message-ID: <20031230222342.GA21802@mail.konqueror.de> References: <3FF1CB7D.6060803@kaffe.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FF1CB7D.6060803@kaffe.org> User-Agent: Mutt/1.3.28i Sender: Michael Koch X-CheckCompat: OK Cc: commit-classpath@gnu.org Subject: Re: FYI: java.net.URL and java.net.URLStreamHandler X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 23:22:35 -0000 On Tue, Dec 30, 2003 at 08:01:17PM +0100, Guilhem Lavaux wrote: > Hi, > > Finally here is the patch which should solve the problems encountered > with URLs concerning relative path transformed into absolute path. I'll > commit it tomorrow. I've corrected some mauve tests to make them pass > with JDK and follow more closely the spec. > > Guilhem. > Index: ChangeLog > =================================================================== > RCS file: /cvsroot/classpath/classpath/ChangeLog,v > retrieving revision 1.1737 > diff -u -r1.1737 ChangeLog > --- ChangeLog 29 Dec 2003 21:50:35 -0000 1.1737 > +++ ChangeLog 30 Dec 2003 18:57:02 -0000 > @@ -1,3 +1,11 @@ > +2003-12-30 Guilhem Lavaux > + > + * java/net/URLStreamHandler.java > + (parseURL): Leave path relative in any case. > + We dont need this new line in changelog entries. It doesnt make the content clearer. Just my 2 cents. > + * java/net/URL.java > + (URL): Change context path to "/" if it is empty. This fixes the last remaining URL.newURL mauve testsuite failure, thx. FAIL: gnu.testlet.java.net.URL.newURL: http://www.kaffe.org + foo/bar = http://www.kaffe.org/foo/bar (number 1) > + > 2003-12-29 Guilhem Lavaux > Michael From MAILER-DAEMON Wed Dec 31 06:29:52 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbeXv-0006P6-M7 for mharc-commit-classpath@gnu.org; Wed, 31 Dec 2003 06:29:51 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbeXi-0006O6-0L for commit-classpath@gnu.org; Wed, 31 Dec 2003 06:29:38 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbeXA-0006LT-Lw for commit-classpath@gnu.org; Wed, 31 Dec 2003 06:29:36 -0500 Received: from [62.4.17.103] (helo=mallaury.noc.nerim.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbeX9-0006Jy-P5 for commit-classpath@gnu.org; Wed, 31 Dec 2003 06:29:03 -0500 Received: from kaffe.org (lavaux.net1.nerim.net [62.212.115.70]) by mallaury.noc.nerim.net (Postfix) with ESMTP id B459462D5F for ; Wed, 31 Dec 2003 11:27:24 +0100 (CET) Message-ID: <3FF2A4AA.5080001@kaffe.org> Date: Wed, 31 Dec 2003 11:27:54 +0100 From: Guilhem Lavaux User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commit-classpath@gnu.org X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------000706070301030700010502" Subject: FYI: java.io.ObjectOutputStream X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2003 11:29:39 -0000 This is a multi-part message in MIME format. --------------000706070301030700010502 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, here is a small fix concerning java.io.ObjectOutputStream: writeFields() should only be call once and putFields() has some unused code. Guilhem. --------------000706070301030700010502 Content-Type: text/plain; name="patch_stream" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch_stream" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1742 diff -u -r1.1742 ChangeLog --- ChangeLog 31 Dec 2003 08:44:39 -0000 1.1742 +++ ChangeLog 31 Dec 2003 10:25:44 -0000 @@ -1,3 +1,10 @@ +2003-12-31 Guilhem Lavaux + + * java/io/ObjectOutputStream.java + (putFields): Removed redundant code. + (writeFields): Check for multiple call to writeFields. + (markFieldsWritten): Fixed exception message. + 2003-12-30 Guilhem Lavaux * java/net/URLStreamHandler.java, Index: java/io/ObjectOutputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v retrieving revision 1.42 diff -u -r1.42 ObjectOutputStream.java --- java/io/ObjectOutputStream.java 28 Dec 2003 18:12:43 -0000 1.42 +++ java/io/ObjectOutputStream.java 31 Dec 2003 10:25:45 -0000 @@ -450,7 +450,7 @@ if (fieldsAlreadyWritten) throw new IOException - ("Only one of putFields and defaultWriteObject may be called, and it may only be called once"); + ("Only one of writeFields and defaultWriteObject may be called, and it may only be called once"); fieldsAlreadyWritten = true; } @@ -876,8 +876,6 @@ if (currentPutField != null) return currentPutField; - markFieldsWritten(); - currentPutField = new PutField() { private byte[] prim_field_data @@ -1029,6 +1027,7 @@ if (currentPutField == null) throw new NotActiveException("writeFields can only be called after putFields has been called"); + markFieldsWritten(); currentPutField.write(this); } --------------000706070301030700010502-- From MAILER-DAEMON Wed Dec 31 07:23:27 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.24) id 1AbfNn-0006QH-5T for mharc-commit-classpath@gnu.org; Wed, 31 Dec 2003 07:23:27 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbfNk-0006Ph-Gx for commit-classpath@gnu.org; Wed, 31 Dec 2003 07:23:24 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbfNC-0006Md-Dp for commit-classpath@gnu.org; Wed, 31 Dec 2003 07:23:21 -0500 Received: from [212.6.122.96] (helo=mail0.ewetel.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbfKW-0005zd-R2 for commit-classpath@gnu.org; Wed, 31 Dec 2003 07:20:04 -0500 Received: from majestix.konqueror.de (dynadsl-080-228-81-074.ewetel.net [80.228.81.74]) by mail0.ewetel.de (8.12.1/8.12.9) with ESMTP id hBVBIY9u021934 for ; Wed, 31 Dec 2003 12:18:34 +0100 (MET) Received: from obelix.konqueror.de ([192.168.1.4]) by majestix.konqueror.de with esmtp (Exim 3.35 #1 (Debian)) id 1AbeQc-0000Qa-00 for ; Wed, 31 Dec 2003 12:22:18 +0100 From: Michael Koch To: commit-classpath@gnu.org Date: Wed, 31 Dec 2003 12:21:41 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_FFr8/0r66HVx+My" Message-Id: <200312311221.41382.konqueror@gmx.de> X-CheckCompat: OK Subject: FYI: Patch: java.awt.Choice X-BeenThere: commit-classpath@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Automatic administrative message (CVS, bugs, regressions). List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2003 12:23:25 -0000 --Boundary-00=_FFr8/0r66HVx+My Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I comitted the attached patch to merge java.awt.Choice with libgcj. Michael --Boundary-00=_FFr8/0r66HVx+My Content-Type: text/x-diff; charset="us-ascii"; name="awt.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="awt.diff" Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1743 diff -u -b -B -r1.1743 ChangeLog --- ChangeLog 31 Dec 2003 10:28:19 -0000 1.1743 +++ ChangeLog 31 Dec 2003 11:16:50 -0000 @@ -1,3 +1,11 @@ +2003-12-31 Fernando Nasser + + * java/awt/Choice.java + (add): Generate ItemEvent for the first item added. + (insert): Generate ItemEvent if insertion caused selection to change. + (remove): Generate ItemEvent if removal cause selection to change. + (removeAll): Change algorithm to prevent generation of ItemEvents. + 2003-12-31 Guilhem Lavaux * java/io/ObjectOutputStream.java Index: java/awt/Choice.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Choice.java,v retrieving revision 1.12 diff -u -b -B -r1.12 Choice.java --- java/awt/Choice.java 3 Jun 2003 16:40:37 -0000 1.12 +++ java/awt/Choice.java 31 Dec 2003 11:16:50 -0000 @@ -171,7 +171,15 @@ } if (i == 0) - select (0); + { + selectedIndex = 0; + // We must generate an ItemEvent here + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent ( + new ItemEvent ((ItemSelectable)this, + ItemEvent.ITEM_STATE_CHANGED, + getItem(0), + ItemEvent.SELECTED)); + } } /*************************************************************************/ @@ -223,7 +231,15 @@ } if (getItemCount () == 1 || selectedIndex >= index) + { select (0); + // We must generate an ItemEvent here + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent ( + new ItemEvent ((ItemSelectable)this, + ItemEvent.ITEM_STATE_CHANGED, + getItem(0), + ItemEvent.SELECTED)); + } } /*************************************************************************/ @@ -265,8 +281,16 @@ cp.remove (index); } - if (index == selectedIndex) + if ((index == selectedIndex) && (getItemCount() > 0)) + { select (0); + // We must generate an ItemEvent here + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent ( + new ItemEvent ((ItemSelectable)this, + ItemEvent.ITEM_STATE_CHANGED, + getItem(0), + ItemEvent.SELECTED)); + } else if (selectedIndex > index) --selectedIndex; } @@ -281,11 +305,27 @@ { int count = getItemCount(); - for (int i = 0; i < count; i++) + if (count <= 0) + return; + + ChoicePeer cp = (ChoicePeer) peer; + + // Select the first item to prevent an spurious ItemEvent to be generated + if (cp != null) { - // Always remove 0. - remove(0); + cp.select (0); + selectedIndex = 0; // Just to keep consistent } + + for (int i = (count - 1); i >= 0; i--) + { + // Always remove the last to avoid generation of ItemEvents. + pItems.removeElementAt(i); + if (cp != null) + cp.remove (i); + } + + selectedIndex = -1; } /*************************************************************************/ --Boundary-00=_FFr8/0r66HVx+My--