public static void closeResources()

in flink-connector-aws-base/src/main/java/org/apache/flink/connector/aws/util/AWSGeneralUtil.java [435:449]


    public static void closeResources(SdkAutoCloseable... resources) {
        RuntimeException exception = null;
        for (SdkAutoCloseable resource : resources) {
            if (resource != null) {
                try {
                    resource.close();
                } catch (RuntimeException e) {
                    exception = ExceptionUtils.firstOrSuppressed(e, exception);
                }
            }
        }
        if (exception != null) {
            throw exception;
        }
    }