public void onChange()

in src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java [220:251]


    public void onChange(final List<ResourceChange> changes) {
        if (resourceBundleRegistry.isClosed()) {
            return;
        }
        final ChangeStatus status = new ChangeStatus();
        try {
            for (final ResourceChange change : changes) {

                if (!this.pathFilter.includePath(change.getPath())) {
                    continue;
                }
                this.onChange(status, change);
                // if we need to reload all, we can skip all other events
                if (status.reloadAll) {
                    break;
                }
            }
            if (status.reloadAll) {
                this.scheduleReloadBundles(true);
            } else {
                for (final JcrResourceBundle bundle : status.reloadBundles) {
                    this.scheduleReloadBundle(bundle);
                }
            }
        } catch (final LoginException le) {
            log.error("Unable to get service resource resolver.", le);
        } finally {
            if (status.resourceResolver != null) {
                status.resourceResolver.close();
            }
        }
    }