fullstop-aws-support/fullstop-aws-cloudtrail-support/src/main/java/org/zalando/stups/fullstop/events/CloudTrailEventSupport.java
public static List<String> read(final String responseElements, final String pattern,
                                    final boolean emptyListOnNullOrEmptyResponse) {
        if (isNullOrEmpty(responseElements) && emptyListOnNullOrEmptyResponse) {
            return emptyList();
        }

        try {
            return JsonPath.read(responseElements, pattern);
        } catch (final PathNotFoundException e) {
            if (emptyListOnNullOrEmptyResponse) {
                return emptyList();
            } else {
                throw e;
            }
        }
    }
public static List<String> read(final String responseElements, final String pattern,
                                    final boolean emptyListOnNullOrEmptyResponse) {
        if (isNullOrEmpty(responseElements) && emptyListOnNullOrEmptyResponse) {
            return emptyList();
        }

        try {
            return JsonPath.read(responseElements, pattern);
        } catch (final PathNotFoundException e) {
            if (emptyListOnNullOrEmptyResponse) {
                return emptyList();
            } else {
                throw e;
            }
        }
    }
public static List < String > read ( final String responseElements , final String pattern , final boolean emptyListOnNullOrEmptyResponse ) { if ( isNullOrEmpty ( responseElements ) && emptyListOnNullOrEmptyResponse ) { return emptyList ( ) ; } try { return JsonPath . read ( responseElements , pattern ) ; } catch ( final PathNotFoundException e ) { if ( emptyListOnNullOrEmptyResponse ) { return emptyList ( ) ; } else { throw e ; } } }
Reads the given 'responseElements' and extracts information based on given 'pattern'.<br/>
If 'responseElements' is null or empty you can handle the {@link IllegalArgumentException} raised or got an empty
list.
Reads the given responseElements and extracts information based on given pattern . <br / > If responseElements is null or empty you can handle the {