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

Naming assumes '/' is present in relative URL; change in URL causes regression

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.0
    • 1.3.0
    • core-libs
    • None
    • beta
    • unknown
    • solaris_2.6

      Naming.rebind("ABC",new MyImpl()) creates a registry entry
      called "BC", because RMI Naming always assume the '/' must be removed.

      ==========

      In kestrel build H the method java.net.URL.getFile() when invoked on a URL created as follows:

      new URL((URL("http:"), "ABC")

      will return, "/ABC" however, in build kestrel build L, then same method will return, "ABC". Because of the behavior in Naming.java described above (a preceding slash is always assumed), remote object names in Naming URLs can be corrupted (as above, the first character of remote object names is removed).

      In question here is what is the correct behavior? Should the URL file name always start with a '/'. If not, then the latest URL fix is correct but apparently not backwards compatible.


      lairdd@east 1999-07-16

            ldorninsunw Laird Dornin (Inactive)
            doburns Dana Burns (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: