Merge branch '6.1.x'
This commit is contained in:
		
						commit
						873c9fe0d8
					
				| 
						 | 
				
			
			@ -204,7 +204,7 @@ final class DefaultRestClient implements RestClient {
 | 
			
		|||
 | 
			
		||||
		MediaType contentType = getContentType(clientResponse);
 | 
			
		||||
 | 
			
		||||
		try (clientResponse) {
 | 
			
		||||
		try {
 | 
			
		||||
			callback.run();
 | 
			
		||||
 | 
			
		||||
			IntrospectingClientHttpResponse responseWrapper = new IntrospectingClientHttpResponse(clientResponse);
 | 
			
		||||
| 
						 | 
				
			
			@ -257,17 +257,18 @@ final class DefaultRestClient implements RestClient {
 | 
			
		|||
					ResolvableType.forType(bodyType) + "] and content type [" + contentType + "]", cause);
 | 
			
		||||
			if (observation != null) {
 | 
			
		||||
				observation.error(restClientException);
 | 
			
		||||
				observation.stop();
 | 
			
		||||
			}
 | 
			
		||||
			throw restClientException;
 | 
			
		||||
		}
 | 
			
		||||
		catch (RestClientException restClientException) {
 | 
			
		||||
			if (observation != null) {
 | 
			
		||||
				observation.error(restClientException);
 | 
			
		||||
				observation.stop();
 | 
			
		||||
			}
 | 
			
		||||
			throw restClientException;
 | 
			
		||||
		}
 | 
			
		||||
		finally {
 | 
			
		||||
			clientResponse.close();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	private static MediaType getContentType(ClientHttpResponse clientResponse) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue