Skip to content
Snippets Groups Projects

Fix cachekey comparisons of param maps to null check

8 files
+ 51
8
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -15,6 +15,7 @@ import javax.ws.rs.core.MultivaluedMap;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipsefoundation.core.namespace.MicroprofilePropertyNames;
import org.eclipsefoundation.core.service.CachingService;
import org.jboss.resteasy.specimpl.MultivaluedMapImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +51,8 @@ public class QuarkusCachingService implements CachingService {
Callable<? extends T> callable) {
Objects.requireNonNull(callable);
ParameterizedCacheKey cacheKey = new ParameterizedCacheKey(rawType, id, params);
ParameterizedCacheKey cacheKey = new ParameterizedCacheKey(rawType, id,
params != null ? params : new MultivaluedMapImpl<>());
LOGGER.debug("Retrieving cache value for '{}'", cacheKey);
return Optional.ofNullable(get(cacheKey, callable));
}
Loading