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

Authenticator.setDefault(null) doest remove previously set authenticator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.1
    • core-libs
    • None
    • generic
    • solaris_8

      According to Authenticator spec, if we set setDefault() to null then it should remove the previously set authenticator. But its not removing. After setting it to null also still it uses that user info to access the resource.


      How to reproduce it:
      ===================
      1. Take the attached TestNullAuth.java
      2. Need to setup a realm with some user list(I have used apache)
      3. Execute this to get below showing output
      java TestNullAuth
      Response url1: 401
      npath = /AuthCheck/
      opath = /AuthCheck/
      second Response url1: 200
      Response for url2: 200 -> This is after setting setDefault to null
      third Response for url1: 200 -> This is after setting setDefault to null

            michaelm Michael McMahon
            vakellasunw Venkata Akella (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: