private void registerBundleMailcapEntries()

in src/main/java/org/apache/sling/javax/activation/internal/Activator.java [88:102]


    private void registerBundleMailcapEntries(Bundle bundle) {

        if (bundle.getState() != Bundle.ACTIVE)
            return;

        URL mailcapEntry = bundle.getEntry(MAILCAP_FILE_NAME);
        if (mailcapEntry == null)
            return;

        try (InputStream input = mailcapEntry.openStream()) {
            commandMap.addMailcapEntries(input, bundle);
        } catch (IOException e) {
            log.warn("Failed loading " + MAILCAP_FILE_NAME + " from bundle " + bundle, e);
        }
    }