From 50a7757c4bb7519245ec84e53901b16dfa6c9c82 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 14 Aug 2023 13:44:53 +0200 Subject: [PATCH] cosmetic: eliminate code warnings --- .../mock/aem/context/MockOverrideSlingPathRequestWrapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {