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

HttpURLConnection.getHeaderFields throwing NullPointerException with build75

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      sparc
    • OS:
      solaris_8

      Description

      HttpURLConnection.getHeaderFields() throwing java.lang.NullPointerException with
      build75. Same test passed with build 74.

      Exception message:

      ERROR: GetURLInfo.main(): exception occurred:
      java.lang.NullPointerException
      java.lang.NullPointerException
              at java.util.Collections$UnmodifiableCollection.<init>(Collections.java:974)
              at java.util.Collections$UnmodifiableList.<init>(Collections.java:1126)
              at java.util.Collections.unmodifiableList(Collections.java:1112)
              at sun.net.www.MessageHeader.getHeaders(MessageHeader.java:130)
              at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:1027)
              at GetURLInfo.printAllHeaderFields(GetURLInfo.java:269)
              at GetURLInfo.PrintURLInfo(GetURLInfo.java:232)
              at GetURLInfo.main(GetURLInfo.java:64)


      How to reproduce it:
      ====================

      1.Take the attached GetURLInfo.java and GetURLInfo.data

      2. Execute as follows
      java -DproxyHost=webcache.east.sun.com -DproxyPort=8080 GetURLInfo -f GetURLInfo.data -o URLinfo_log

        Attachments

          Activity

            People

            • Assignee:
              jjb Josh Bloch
              Reporter:
              vakellasunw Venkata Akella (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: