Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Conversation

bipster
Copy link

@bipster bipster commented Feb 24, 2019

This resolves #8

Backward compatibility: clients using the existing constructors would see no change; the default timeout is no-timeout, and that is preserved via the default options via new ConnectionProperties() in those constructors.

Note: If a client does explicitly set timeouts via the new construtors, a timeout will result in a java.net.SocketTimeoutException propagating up to the client code, not the existing IOException handler which processes the error stream (there wouldn't be one in the case of a socket timeout, and so this code would result in an NPE)

  underlying HttpURLConnection object. Using new ConnectionProperties
  class so that additional properties might be added later without
  requiring changed/new constructors.
  makes the defaults clearer. Also fixes bug wherein connection
  properties weren't being given a default value when using the
  existing constructors.
  this was resulting in an NPE instead as the exception handler
  attempted to process the request anyway).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing timeouts to the underlying HttpURLConnection
1 participant