diff --git a/core/src/main/java/io/wcm/testing/mock/aem/MockExternalizer.java b/core/src/main/java/io/wcm/testing/mock/aem/MockExternalizer.java index 837b4d72..ed7c845a 100644 --- a/core/src/main/java/io/wcm/testing/mock/aem/MockExternalizer.java +++ b/core/src/main/java/io/wcm/testing/mock/aem/MockExternalizer.java @@ -125,7 +125,7 @@ public String relativeLink(SlingHttpServletRequest request, String path) { return getMappedPath(request.getResourceResolver(), path); } - private String buildExternalLink(@Nullable ResourceResolver resourceResolver, String domain, String scheme, String path) { + private String buildExternalLink(@Nullable ResourceResolver resourceResolver, @NotNull String domain, @Nullable String scheme, @NotNull String path) { URI domainURI = domainMappings.get(Objects.requireNonNull(domain)); if (domainURI == null) { throw new IllegalArgumentException("No mapping defined for: " + domain); @@ -149,7 +149,7 @@ private String buildExternalLink(@Nullable ResourceResolver resourceResolver, St return url.toString(); } - private String buildAbsoluteLink(@NotNull SlingHttpServletRequest request, String scheme, String path) { + private String buildAbsoluteLink(@NotNull SlingHttpServletRequest request, @NotNull String scheme, @NotNull String path) { // return path unchanged if it is already absolute (or if no request available) if (StringUtils.contains(path, SCHEME_SEPARATOR)) { diff --git a/core/src/test/java/io/wcm/testing/mock/aem/MockExternalizerSlingMappingTest.java b/core/src/test/java/io/wcm/testing/mock/aem/MockExternalizerSlingMappingTest.java index 993881b7..0b9da2a4 100644 --- a/core/src/test/java/io/wcm/testing/mock/aem/MockExternalizerSlingMappingTest.java +++ b/core/src/test/java/io/wcm/testing/mock/aem/MockExternalizerSlingMappingTest.java @@ -2,7 +2,7 @@ * #%L * wcm.io * %% - * Copyright (C) 2021 wcm.io + * Copyright (C) 2024 wcm.io * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.