core/src/main/java/net/typedrest/AbstractEndpoint.java
@SuppressWarnings("LocalVariableHidesMemberVariable")
    private void handleLinks(HttpResponse response) {
        Map<String, Map<URI, String>> links = new HashMap<>();
        Map<String, String> linkTemplates = new HashMap<>();

        handleHeaderLinks(response, links, linkTemplates);

        HttpEntity entity = response.getEntity();
        if (entity != null) {
            Header contentType = entity.getContentType();
            if ((contentType != null) && contentType.getValue().startsWith("application/json")) {
                try {
                    handleBodyLinks(serializer.readTree(entity.getContent()), links, linkTemplates);
                } catch (IOException ex) {
                    throw new RuntimeException();
                    // Body error handling is done elsewhere
                }
            }
        }

        this.links = unmodifiableMap(links);
        this.linkTemplates = unmodifiableMap(linkTemplates);
    }
@SuppressWarnings("LocalVariableHidesMemberVariable")
    private void handleLinks(HttpResponse response) {
        Map<String, Map<URI, String>> links = new HashMap<>();
        Map<String, String> linkTemplates = new HashMap<>();

        handleHeaderLinks(response, links, linkTemplates);

        HttpEntity entity = response.getEntity();
        if (entity != null) {
            Header contentType = entity.getContentType();
            if ((contentType != null) && contentType.getValue().startsWith("application/json")) {
                try {
                    handleBodyLinks(serializer.readTree(entity.getContent()), links, linkTemplates);
                } catch (IOException ex) {
                    throw new RuntimeException();
                    // Body error handling is done elsewhere
                }
            }
        }

        this.links = unmodifiableMap(links);
        this.linkTemplates = unmodifiableMap(linkTemplates);
    }
@ SuppressWarnings ( "LocalVariableHidesMemberVariable" ) private void handleLinks ( HttpResponse response ) { Map < String , Map < URI , String > > links = new HashMap <> ( ) ; Map < String , String > linkTemplates = new HashMap <> ( ) ; handleHeaderLinks ( response , links , linkTemplates ) ; HttpEntity entity = response . getEntity ( ) ; if ( entity != null ) { Header contentType = entity . getContentType ( ) ; if ( ( contentType != null ) && contentType . getValue ( ) . startsWith ( "application/json" ) ) { try { handleBodyLinks ( serializer . readTree ( entity . getContent ( ) ) , links , linkTemplates ) ; } catch ( IOException ex ) { throw new RuntimeException ( ) ; // Body error handling is done elsewhere } } } this . links = unmodifiableMap ( links ) ; this . linkTemplates = unmodifiableMap ( linkTemplates ) ; }
Handles links embedded in an HTTP response.

@param response The response to check for links.
Handles links embedded in an HTTP response .