This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: Fix InetAddress.getByName and loopback issues


Bryce McKinlay wrote:

Passing null to InetAddress.getByName() and getAllByName should return the loopback InetAddress. Its possible to do this without the normal security check - passing a null argument to SecurityManager would be a NullPointerException. This also cleans up the security checks - lookup() does not need to do a check becuase the public methods that call it will have done it already. In the getByName() case, we were actually doing the check 3 times - once in getByName, once in getAllByName, and then again in lookup.


I also checked in some mauve tests for this.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]