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

URLConnection catches and ignores Throwable exceptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-libs
    • None
    • beta
    • generic
    • generic

      The URLConnection class contains default implementations
      of at least 2 methods that internally catch Throwable and then
      ignore the exception and simply return a default value.
      An example of this is getHeaderFieldInt() and getHeaderFieldDate().
      Even though the caught exceptions are Throwable it is wrong to simply
      catch and then throw them away. In particular, the ThreadDeath
      Throwable exception is used by the implementation of Thread.stop()
      and must be rethrown if caught.

            alanb Alan Bateman
            jdn Jeffrey Nisewanger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: