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

HttpURLConnection.getHeaderFields throwing NullPointerException with build75

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta2
    • sparc
    • solaris_8

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: