Path: csiph.com!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!gegeweb.org!aioe.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.programmer Subject: Re: Strange Socket problem Date: Sat, 03 Mar 2012 08:41:51 +0000 Organization: Aioe.org NNTP Server Lines: 26 Message-ID: References: <4f512b27$0$26687$65785112@news.neostrada.pl> NNTP-Posting-Host: SYma/1Oij9bhI+errvtPhg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:12621 On 03/03/12 02:13, Martin Gregorie wrote: > new Socket() can return null (it says, but not why) but I don't think > that is happening or you'd have seen an NPE. Where are you seeing this? How can a constructor 'return' null? In another post, you also said (about InetAddress.getByName()): > All I wanted to do was to flag up that its odd that the Javadocs say that > sometimes it returns null without (apparently) throwing an exception but > don't say explicitly what governs each behaviour, and that it would be > useful to call it in such a way that that you force it to make that > distinction explicit. Again, I don't see where this is said. Am I looking at the wrong docs? Cheers! -- ss at comp dot lancs dot ac dot uk