Source:
<code>public static <T> T extractResult(GenericType<T> responseType, Response response, Annotation[] annotations) { int status = response.getStatus(); if (status >= 200 && status < 300) { try { if (response.getMediaType() == null) { return null; } else { T rtn = response.readEntity(responseType, annotations); if (InputStream.class.isInstance(rtn) || Reader.class.isInstance(rtn) || EventInput.class.isInstance(rtn)) { if (response instanceof ClientResponse) { ClientResponse clientResponse = (ClientResponse) response; clientResponse.noReleaseConnection(); } } return rtn; } } catch (WebApplicationException wae) { try { response.close(); } catch (Exception e) { } throw wae; } catch (Throwable throwable) { try { response.close(); } catch (Exception e) { } throw new ResponseProcessingException(response, throwable); } finally { if (response.getMediaType() == null) response.close(); } } try { String s = String.class.cast(response.getHeaders().getFirst("resteasy.buffer.exception.entity")); if (s == null || Boolean.parseBoolean(s)) { response.bufferEntity(); } else { if (response instanceof ClientResponse) { try { ClientResponse.class.cast(response).releaseConnection(); } catch (IOException e) { } } } if (status >= 300 && status < 400) { Config config = ConfigProvider.getConfig(); <START> boolean originalBehavior = config.getOptionalValue(ResteasyContextParameters.RESTEASY_ORIGINAL_WEBAPPLICATIONEXCEPTION_BEHAVIOR, boolean.class).orElse(false); <END> boolean serverSide = ResteasyProviderFactory.searchContextData(Dispatcher.class) != null; if (!serverSide || originalBehavior) { throw new RedirectionException(response); } else { throw new ResteasyRedirectionException(response); } } return handleErrorStatus(response); } finally { if (response.getMediaType() == null) response.close(); } }</code><technical_language>this moved a private method invoked "if" (in order avoid duplication benefit short-circuit behaviour of || operator)</technical_language>

Target:
public static <T> T extractResult(GenericType<T> responseType, Response response, Annotation[] annotations) { int status = response.getStatus(); if (status >= 200 && status < 300) { try { if (response.getMediaType() == null) { return null; } else { T rtn = response.readEntity(responseType, annotations); if (InputStream.class.isInstance(rtn) || Reader.class.isInstance(rtn) || EventInput.class.isInstance(rtn)) { if (response instanceof ClientResponse) { ClientResponse clientResponse = (ClientResponse) response; clientResponse.noReleaseConnection(); } } return rtn; } } catch (WebApplicationException wae) { try { response.close(); } catch (Exception e) { } throw wae; } catch (Throwable throwable) { try { response.close(); } catch (Exception e) { } throw new ResponseProcessingException(response, throwable); } finally { if (response.getMediaType() == null) response.close(); } } try { String s = String.class.cast(response.getHeaders().getFirst("resteasy.buffer.exception.entity")); if (s == null || Boolean.parseBoolean(s)) { response.bufferEntity(); } else { if (response instanceof ClientResponse) { try { ClientResponse.class.cast(response).releaseConnection(); } catch (IOException e) { } } } if (status >= 300 && status < 400) { boolean serverSide = ResteasyProviderFactory.searchContextData(Dispatcher.class) != null; if (!serverSide || useOriginalBehavior()) { throw new RedirectionException(response); } else { throw new ResteasyRedirectionException(response); } } return handleErrorStatus(response); } finally { if (response.getMediaType() == null) response.close(); } }