private void setChecks(HealthCheckResponse response) {

        HashMap<String, Object> check = new HashMap<String, Object>();
        check.put(HEALTH_CHECK_PAYLOAD_NAME, response.getName());

        State checkState = response.getState();
        check.put(HEALTH_CHECK_PAYLOAD_STATE, checkState);
        if (checkState != null) {
            if (checkState.equals(State.DOWN))
                overallState = State.DOWN;
        } else {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "setChecks(): checkState is null");
            overallState = State.DOWN; // treat as fail case
        }

        Optional<Map<String, Object>> data = response.getData();
        if ((data != null) && data.isPresent())
            check.put(HEALTH_CHECK_PAYLOAD_DATA, data.get());

        checks.add(check);
        if (tc.isDebugEnabled())
            Tr.debug(tc, "setChecks(): checks = " + checks);
    }
private void setChecks ( HealthCheckResponse response ) { HashMap < String , Object > check = new HashMap < String , Object > ( ) ; check . put ( HEALTH_CHECK_PAYLOAD_NAME , response . getName ( ) ) ; State checkState = response . getState ( ) ; check . put ( HEALTH_CHECK_PAYLOAD_STATE , checkState ) ; if ( checkState != null ) { if ( checkState . equals ( State . DOWN ) ) overallState = State . DOWN ; } else { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setChecks(): checkState is null" ) ; overallState = State . DOWN ; } Optional < Map < String , Object > > data = response . getData ( ) ; if ( ( data != null ) && data . isPresent ( ) ) check . put ( HEALTH_CHECK_PAYLOAD_DATA , data . get ( ) ) ; checks . add ( check ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setChecks(): checks = " + checks ) ; }
--------------------------------