diff --git a/core/src/test/java/io/wcm/testing/mock/aem/context/MockOverrideSlingPathRequestWrapper.java b/core/src/test/java/io/wcm/testing/mock/aem/context/MockOverrideSlingPathRequestWrapper.java index e5537cf6..37f312d3 100644 --- a/core/src/test/java/io/wcm/testing/mock/aem/context/MockOverrideSlingPathRequestWrapper.java +++ b/core/src/test/java/io/wcm/testing/mock/aem/context/MockOverrideSlingPathRequestWrapper.java @@ -33,7 +33,7 @@ class MockOverrideSlingPathRequestWrapper extends SlingHttpServletRequestWrapper super(request); this.adapterManager = adapterManager; this.myBindings = new SlingBindings(); - this.adaptersCache = new HashMap(); + this.adaptersCache = new HashMap<>(); SlingBindings slingBindings = (SlingBindings)this.getSlingRequest().getAttribute(ATTR_SLING_BINDINGS); this.resource = this.getSlingRequest().getResourceResolver().resolve(this.getSlingRequest(), path); if (slingBindings != null) { @@ -84,6 +84,7 @@ public Resource getResource() { * Overriding `adaptTo` to avoid using the original request as the adaptable. */ @Override + @SuppressWarnings({ "null", "unchecked" }) public AdapterType adaptTo(Class type) { AdapterType result = null; synchronized (this) {