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

NPE in sun.net.www.http.ChunkedInputStream.readChunkSize()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta
    • x86
    • windows_nt



      Name: krC82822 Date: 12/03/2000


      C:\>java -version
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      The following exception occurred while trying to read an HTML page with URL =
      http://www.amazon.com:80/exec/obidos/tg/browse/-/11268/

      Unfortunately, I wasn't able to repeat it, but hopefully someone can look at the
      readChunkSize() code to add a check for a null pointer and handle the
      condition, so the problem doesn't occurr again.

      java.lang.NullPointerException
              at
      sun.net.www.http.ChunkedInputStream.readChunkSize(ChunkedInputStream.java:162)
              at
      sun.net.www.http.ChunkedInputStream.prefill(ChunkedInputStream.java:187)
              at
      sun.net.www.http.ChunkedInputStream.<init>(ChunkedInputStream.java:94)
              at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:738)
              at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:602)
              at
      sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.jav
      a:481)
              at
      java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:230)
              at mergent.html.BatchEditorPane.getStream(BatchEditorPane.java:328)
              at mergent.html.BatchEditorPane.setPage(BatchEditorPane.java:216)
              at mergent.html.BatchEditorPane.setPage(BatchEditorPane.java:406)
              at mergent.html.ProcessPage$2.run(ProcessPage.java:1145)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:317)
              at
      java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
      (Review ID: 112325)
      ======================================================================

            alanb Alan Bateman
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: