public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marco Trudel <mtrudel@gmx.ch>
To: java-patches@gcc.gnu.org
Subject: Re: FYI: Win32 InetAddress fix (really)
Date: Tue, 03 Oct 2006 15:30:00 -0000	[thread overview]
Message-ID: <4522821B.3010907@gmx.ch> (raw)
In-Reply-To: <20061003103525.GC6967@redhat.com>

Yep, this time it works :-)

thanks
Marco


Gary Benson wrote:
> Hi all,
> 
> Marco pointed out that my last commit didn't fix the
> NullPointerException.  This commit ought to.
> 
> Cheers,
> Gary
> 
> 
> ------------------------------------------------------------------------
> 
> Index: ChangeLog
> ===================================================================
> --- ChangeLog	(revision 117370)
> +++ ChangeLog	(working copy)
> @@ -1,3 +1,8 @@
> +2006-10-03  Gary Benson  <gbenson@redhat.com>
> +
> +	* java/net/InetAddress.java
> +	(<clinit>): Reorder the static initializers.
> +
>  2006-10-02  Gary Benson  <gbenson@redhat.com>
>  
>  	* 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.

      parent reply	other threads:[~2006-10-03 15:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-04 14:15 RFC: Untested Win32 InetAddress tweak Gary Benson
2006-09-06 16:58 ` Tom Tromey
2006-09-07  7:36   ` Gary Benson
2006-10-01 17:36 ` Marco Trudel
2006-10-01 18:00   ` Mohan Embar
2006-10-02  7:19     ` Marco Trudel
2006-10-02 10:55       ` FYI: Win32 InetAddress fix Gary Benson
2006-10-02 11:22         ` Marco Trudel
2006-10-02 17:43           ` Tom Tromey
2006-10-03 10:35         ` FYI: Win32 InetAddress fix (really) Gary Benson
2006-10-03 15:10           ` David Daney
2006-10-03 16:55             ` Andrew Haley
2006-10-03 17:23               ` David Daney
2006-10-04  8:37                 ` Gary Benson
2006-10-03 15:30           ` Marco Trudel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4522821B.3010907@gmx.ch \
    --to=mtrudel@gmx.ch \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).