From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29132 invoked by alias); 3 Oct 2006 17:23:17 -0000 Received: (qmail 29122 invoked by uid 22791); 3 Oct 2006 17:23:17 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Oct 2006 17:23:11 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 21454C4B24; Tue, 3 Oct 2006 13:23:09 -0400 (EDT) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Tue, 3 Oct 2006 13:23:09 -0400 (EDT) Received: from [192.168.7.26] ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 3 Oct 2006 10:23:07 -0700 Message-ID: <45229C7B.20002@avtrex.com> Date: Tue, 03 Oct 2006 17:23:00 -0000 From: David Daney User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) MIME-Version: 1.0 To: Andrew Haley Cc: java-patches@gcc.gnu.org, gbenson@redhat.com Subject: Re: FYI: Win32 InetAddress fix (really) References: <4520BD9B.8070802@gmx.ch> <20061002105534.GB4239@redhat.com> <20061003103525.GC6967@redhat.com> <45227D4F.1000906@avtrex.com> <17698.38378.993886.203823@zebedee.pink> In-Reply-To: <17698.38378.993886.203823@zebedee.pink> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00015.txt.bz2 Andrew Haley wrote: > David Daney writes: > > Gary Benson wrote: > > > + // Some soon-to-be-removed native code synchronizes on this. > > > + loopbackAddress = LOCALHOST; > > > + } > > > + catch (UnknownHostException e) > > > + { > > > + throw new RuntimeException("should never happen", e); > > > + } > > > > > Would it be better to throw an InternalError here rather than > > RuntimeException? If it truly should never happen then it would be an > > InternalError if it did. If it can happen, then it should be of some > > type the describes the problem. > > AFAICR this is the kind of thing that happens if the IP address of the > loopback interface doesn't have a resolvable name, > I guess in this specific case it does not really matter as it is in a static initializer and the result would be an ExceptionInInitiazerError either way. But in general I don't like the use RuntimeException. It makes me think that we were too lazy to figure out what to do and took the easy (but inelegant and probably incorrect) way out by circumventing java's checked exception requirements. David Daney