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

URI syntax and components - Identities description wrong

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      The documentation of the URI identities is wrong. It applies to the JAVA 7 documentation as well (others not tested). The amount of parameters in the "in all cases" example doesn't match the constructor. User-info is a component of authority and is superfluous. If removed it matches the constructor again.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      in all cases,

           new URI(u.getScheme(),
                   u.getAuthority(),
                   u.getPath(), u.getQuery(),
                   u.getFragment())
           .equals(u)
      ACTUAL -
      in all cases,

           new URI(u.getScheme(),
                   u.getUserInfo(), u.getAuthority(),
                   u.getPath(), u.getQuery(),
                   u.getFragment())
           .equals(u)

      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/8/docs/api/java/net/URI.html

            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: