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

NullPointerException in sun.net.www.protocol.http.HttpURLConnection.followRedirect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • core-libs
    • None
    • beta
    • generic
    • generic

      The problem exists in tiger and mustang, run the attached testcase and you will get NullPointerException:


      C:\redirect>"c:\progra~1\java\jdk1.6.0\bin\java.exe" -DproxyHost=scaweb1.sfbay.s
      un.com -DproxyPort=8080 test
      get!!!: http://games.iwon.com/games/blam/common/silent.au
      response code: 304
      disconnect: sun.net.www.protocol.http.HttpURLConnection:http://errdocs.iwon.com
      get!!!: http://errdocs.iwon.com/
      response code: 304
      disconnect: sun.net.www.protocol.http.HttpURLConnection:http://errdocs.iwon.com/

      java.lang.NullPointerException
              at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLCon
      nection.java:1800)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
      nection.java:1138)
              at java.net.URL.openStream(URL.java:1007)
              at test.main(test.java:11)
      ###@###.### 2005-07-20 23:01:26 GMT

            yuwangsunw Yujiang Wang (Inactive)
            ngthomas Thomas Ng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: