@Override
    public ResourceSet saveInternal(final ResourceSet set) {
        if (set.getId() <= 0) {
            set.setId(System.currentTimeMillis());
        }
        repository.put(set.getId(), set);
        return super.saveInternal(set);
    }
This is {@link DefaultResourceSetRepository}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-oauth-uma-core/src/main/java/org/apereo/cas/uma/ticket/resource/repository/impl/DefaultResourceSetRepository.java