CSDN|给 JDK 报了一个P4 的 Bug,结果居然……( 三 )


What he didn't spell out is that fixing this inconsistency (by changing the URL class specification) would break lots of peoples' 20+ year old code Java code. That would be a really bad idea. It can't happen.
【CSDN|给 JDK 报了一个P4 的 Bug,结果居然……】So ... this inconsistency is a "feature".
附本文链接: [1] URI、URL 和 URN: https://www.ibm.com/developerworks/cn/xml/x-urlni.html [2]wiki URI: https://en.wikipedia.org/wiki/Uniform_Resource_Identifier [3]JDK-8132508 : Bug JDK-8029354 reproduces with underscore in hostname: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8132508 [4]rfc952: https://tools.ietf.org/html/rfc952 [5]stackoverflow: https://stackoverflow.com/questions/44226003/conflicts-between-java-net-url-and-java-net-uri-when-dealing-with-hostname-conta [6]JDK-8170265 : underscore is allowed in java.net.URL while not in java.net.URI: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8170265 [7]openjdk JDK-8170265: https://bugs.openjdk.java.net/browse/JDK-8170265 [8]在线 api doc 戳这里: https://docs.oracle.com/javase/8/docs/api/java/net/URL.html [9]这里有java.net.URL 的源码: http://www.docjar.com/html/api/java/net/URL.java.html [10]我在SO提问的这个回答: https://stackoverflow.com/questions/44226003/conflicts-between-java-net-url-and-java-net-uri-when-dealing-with-hostname-conta?answertab=active#tab-to更多精彩推荐点点赞点在看


推荐阅读