Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7041800

URI.equals may incorrectly return true with escaped octets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 6u24
    • core-libs
    • None
    • b06
    • generic
    • generic
    • Verified

        Consider the following:

        import java.net.*;

        public class Test {
            public static void main(String[] args) throws Exception {
                URI uri1 = new URI("http://host/a%00");
                URI uri2 = new URI("http://host/aZ00");
                System.out.println(uri1.equals(uri2));
            }
        }

        It incorrectly prints true with jdk7-b140 (same thing for all previous releases)

              chegar Chris Hegarty
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: