public Pair<Map<String, Set<String>>, UserTO> self() { // Explicitly disable header value split because it interferes with JSON deserialization below UserSelfService service = getService(UserSelfService.class); WebClient.getConfig(WebClient.client(service)).getRequestContext().put(HEADER_SPLIT_PROPERTY, false); Response response = service.read(); if (response.getStatusInfo().getStatusCode() != Response.Status.OK.getStatusCode()) { Exception ex = exceptionMapper.fromResponse(response); if (ex != null) { throw (RuntimeException) ex; } } try { return Pair.of( OBJECT_MAPPER.readValue( response.getHeaderString(RESTHeaders.OWNED_ENTITLEMENTS), new TypeReference<Map<String, Set<String>>>() { }), response.readEntity(UserTO.class)); } catch (IOException e) { throw new IllegalStateException(e); } }
public Pair<Map<String, Set<String>>, UserTO> self() { // Explicitly disable header value split because it interferes with JSON deserialization below UserSelfService service = getService(UserSelfService.class); WebClient.getConfig(WebClient.client(service)).getRequestContext().put(HEADER_SPLIT_PROPERTY, false); Response response = service.read(); if (response.getStatusInfo().getStatusCode() != Response.Status.OK.getStatusCode()) { Exception ex = exceptionMapper.fromResponse(response); if (ex != null) { throw (RuntimeException) ex; } } try { return Pair.of( OBJECT_MAPPER.readValue( response.getHeaderString(RESTHeaders.OWNED_ENTITLEMENTS), new TypeReference<Map<String, Set<String>>>() { }), response.readEntity(UserTO.class)); } catch (IOException e) { throw new IllegalStateException(e); } }