title: Conflicts between java.net.URL and java.net.URI when dealing with hostname contains underscore( ), is it a bug?
body: <p>Someone has submiited a bug to JDK, saying that hostname contains underscore(_) is not valid url.
  The following was the response.  <a href="http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8132508" rel="nofollow noreferrer">reference link</a></p>
  
  <blockquote>
    <p>RFC 952 disallows _ underscores in hostnames. So, this is not a bug. I also haven't been able to find examples of actual usage.
    So, unless a particularly compelling case can be made, I'm closing as not a bug.</p>
  </blockquote>
  
  <p>I am wondering, if hostname with underscore is not valid, <strong>why the result is differrent between java.net.URI and java.net.URL</strong>? Is it <strong>a bug</strong> or a feature? 
  Here is the example.</p>
  
  <pre><code>java.net.URL url = new java.net.URL("http://test_1.tanglei.name");
  System.out.println(url.getHost()); //test_1.tanglei.name
  java.net.URI uri = new java.net.URI("http://test_1.tanglei.name");
  System.out.println(uri.getHost()); //null 
  </code></pre>