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

java.net.URLConnection javadocs don't indicate what the default timeout is

XMLWordPrintable

    • x86
    • linux

      A DESCRIPTION OF THE PROBLEM :
      The sources of java.net.URLConnection suggests that the default connection timeout is set to 0. However, the javadocs on the functions java.net.URLConnection#getConnectTimeout() or java.net.URLConnection#setConnectTimeout(), do not mention this explicitly.

      It is mentioned in these methods that a value of 0 will translate to infinite timeout, but it is not mentioned that the value 0 is also the default (as the sources suggest).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Returns setting for connect timeout. Default is 0.
      ACTUAL -
      Returns setting for connect timeout.

      URL OF FAULTY DOCUMENTATION :
      http://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#getConnectTimeout()

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: