Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ResourceType-specific checks from ResourcePoolsImpl.validateAndMerge #891

Open
cljohnso opened this issue Mar 24, 2016 · 0 comments
Open
Labels

Comments

@cljohnso
Copy link
Contributor

The two checks in org.ehcache.core.config.ResourcePoolsImpl#validateAndMerge specific to OFFHEAP and DISK should be moved to those resource types -- the restrictions are defined as behavior of the type -- in order to remove the type-specific behavior from validateAndMerge logic.

The two checks at issue are:

    if(toBeUpdated.getResourceTypeSet().contains(ResourceType.Core.OFFHEAP)) {
      throw new UnsupportedOperationException("Updating OFFHEAP resource is not supported");
    }
    if(toBeUpdated.getResourceTypeSet().contains(ResourceType.Core.DISK)) {
      throw new UnsupportedOperationException("Updating DISK resource is not supported");
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Unprioritized
Development

No branches or pull requests

3 participants