From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24034 invoked by alias); 3 Oct 2006 10:35:34 -0000 Received: (qmail 24026 invoked by uid 22791); 3 Oct 2006 10:35:33 -0000 X-Spam-Check-By: sourceware.org Received: from gbenson.demon.co.uk (HELO gbenson.demon.co.uk) (80.177.220.214) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Oct 2006 10:35:31 +0000 Received: from mambo.wire.rat ([192.168.1.6]) by gbenson.demon.co.uk with esmtp (Exim 3.36 #1) id 1GUhcX-0005JI-00; Tue, 03 Oct 2006 11:35:29 +0100 Received: from mambo.wire.rat (localhost.localdomain [127.0.0.1]) by mambo.wire.rat (8.13.7/8.13.6) with ESMTP id k93AZT5n003731; Tue, 3 Oct 2006 11:35:29 +0100 Received: (from gary@localhost) by mambo.wire.rat (8.13.7/8.13.7/Submit) id k93AZSpP003730; Tue, 3 Oct 2006 11:35:28 +0100 Date: Tue, 03 Oct 2006 10:35:00 -0000 From: Gary Benson To: java-patches@gcc.gnu.org Subject: FYI: Win32 InetAddress fix (really) Message-ID: <20061003103525.GC6967@redhat.com> Mail-Followup-To: java-patches@gcc.gnu.org References: <4520BD9B.8070802@gmx.ch> <20061002105534.GB4239@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <20061002105534.GB4239@redhat.com> X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2006-q4/txt/msg00009.txt.bz2 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 121 Hi all, Marco pointed out that my last commit didn't fix the NullPointerException. This commit ought to. Cheers, Gary --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="inetaddress-merge-win32-really-fix.patch" Content-length: 1874 Index: ChangeLog =================================================================== --- ChangeLog (revision 117370) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-10-03 Gary Benson + + * java/net/InetAddress.java + (): Reorder the static initializers. + 2006-10-02 Gary Benson * java/net/InetAddress.java Index: java/net/InetAddress.java =================================================================== --- java/net/InetAddress.java (revision 117370) +++ java/net/InetAddress.java (working copy) @@ -66,6 +66,24 @@ private static final long serialVersionUID = 3286316764910316507L; /** + * Stores static localhost address object. + */ + static InetAddress LOCALHOST; + static + { + try + { + LOCALHOST = getByAddress("localhost", new byte[] {127, 0, 0, 1}); + // Some soon-to-be-removed native code synchronizes on this. + loopbackAddress = LOCALHOST; + } + catch (UnknownHostException e) + { + throw new RuntimeException("should never happen", e); + } + } + + /** * Dummy InetAddress, used to bind socket to any (all) network interfaces. */ static InetAddress ANY_IF; @@ -93,24 +111,6 @@ } /** - * Stores static localhost address object. - */ - static InetAddress LOCALHOST; - static - { - try - { - LOCALHOST = getByAddress("localhost", new byte[] {127, 0, 0, 1}); - // Some soon-to-be-removed native code synchronizes on this. - loopbackAddress = LOCALHOST; - } - catch (UnknownHostException e) - { - throw new RuntimeException("should never happen", e); - } - } - - /** * The Serialized Form specifies that an int 'address' is saved/restored. * This class uses a byte array internally so we'll just do the conversion * at serialization time and leave the rest of the algorithm as is. --d6Gm4EdcadzBjdND--