protected void activate()

in src/main/java/org/apache/sling/jmx/provider/impl/JMXResourceProvider.java [105:126]


    protected void activate(final Config config) {
        final String[] paths = config.provider_roots();
        final List<String> rootsList = new ArrayList<>();
        final List<String> rootsWithSlashList = new ArrayList<>();
        if ( paths != null ) {
            for(final String p : paths) {
                if ( p.length() > 0 ) {
                    if ( p.endsWith("/") ) {
                        rootsList.add(p.substring(0,  p.length() - 1));
                        rootsWithSlashList.add(p);
                    } else {
                        rootsList.add(p);
                        rootsWithSlashList.add(p + "/");
                    }
                }
            }
        }
        this.rootsWithSlash = rootsWithSlashList.toArray(new String[rootsWithSlashList.size()]);
        this.roots = rootsList.toArray(new String[rootsList.size()]);

        this.mbeanServer = ManagementFactory.getPlatformMBeanServer();
    }