Clarify CacheManager properties pass-through behavior
Closed this issue · 0 comments
Javadoc of CachingProvider getCacheManager(URI uri, ClassLoader classLoader, Properties properties)
states:
Properties are caching implementation specific. The behavior of mutating
properties obtained from {@link CacheManager#getProperties()} is undefined.
Javadoc of CacheManager.getProperties()
states:
Get the {@link Properties} that were used to create this {@link CacheManager}.
If properties are completely implementation specific, then no behavior should be asserted by the TCK on CacheManager
s created with properties. This means that it is not possible to assert the pass-through behavior suggested by CacheManager.getProperties()
.
Proposed solution (as per jsr107/jsr107tck#102 (comment)) is to scope properties and assert the pass-through behavior in the TCK.
- Amend javadoc of
CachingProvider.getCacheManager(URI uri, ClassLoader classLoader, Properties properties)
as follows:
Properties names follow the same scheme as package names.
The prefixes {@code java} and {@code javax} are reserved.
Properties are passed through and can be retrieved via {@link CacheManager#getProperties()}.
Properties within the package scope of a caching implementation may be used for
additional configuration.
- Update
getCacheManager_nonNullProperties
test to assert the pass-through behavior with test properties in reserved scope.