@Override public boolean accept(final Class<?> scope, final String absolutePath) { // use double checked locking pattern to reduce overhead if (!initialized) { synchronized (this) { if (!initialized) { onInit(); initialized = true; } } } if (isUserLoggedIn() || isWhitelisted(scope)) { return super.accept(scope, absolutePath); } log.error("Public access denied to non-whitelisted (static) package resource: {}", absolutePath); return false; }