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

Not quite correct code sample in javadoc

XMLWordPrintable

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

        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.

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

                Created:
                Updated:
                Resolved: