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

Not quite correct code sample in javadoc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P5
    • 9
    • 8
    • core-libs
    • None
    • b34

    Backports

      Description

        http://docs.oracle.com/javase/8/docs/api/java/net/URI.html

        Javadoc of the URI class contains this sample:

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

        The constructor used does not correspond to any existing one.
        Most likely u.getUserInfo() is redundant here.

        Attachments

          Issue Links

            Activity

              People

                igerasim Ivan Gerasimov
                igerasim Ivan Gerasimov
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: