restlet/restlet-framework-java — Issue #12: ServerResource.getVariants(Method) caches without reference to Method
Author: ansell
Created: 2012-03-01 02:39:59+00:00
State: open

The return value from ServerResource.getVariants(Method) is cached in the instance variable this.variants, but the cached value is not correlated with the method that was passed in.

Future calls to ServerResource.getVariants(Method) with different Method arguments will return the cached results for whatever Method was in the first call, which may be incorrect.

The cache could be implemented as a Map> instead of just List to solve this issue.