public void close()

in impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java [256:295]


    public void close() throws Exception {
        List<Exception> exceptions = new ArrayList<>();

        converters.values().stream()
                .filter(c -> c instanceof AutoCloseable)
                .map(AutoCloseable.class::cast)
                .forEach(c -> {
                    try {
                        c.close();
                    }
                    catch (Exception e) {
                        exceptions.add(e);
                    }
                });

        configSources.stream()
                .filter(c -> c instanceof AutoCloseable)
                .map(AutoCloseable.class::cast)
                .forEach(c -> {
                    try {
                        c.close();
                    }
                    catch (Exception e) {
                        exceptions.add(e);
                    }
                });

        if (!exceptions.isEmpty()) {
            StringBuilder sb = new StringBuilder(1024);
            sb.append("The following Exceptions got detected while shutting down the Config:\n");
            for (Exception exception : exceptions) {
                sb.append(exception.getClass().getName())
                        .append(" ")
                        .append(exception.getMessage())
                        .append('\n');
            }

            throw new RuntimeException(sb.toString(), exceptions.get(0));
        }
    }