Skip to content

Commit 004b62d

Browse files
committed
Injector wrongly logs that a field is required, while optional state is validated by the ModelAdapterFactory
1 parent 3531812 commit 004b62d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/main/java/org/apache/sling/models/impl/injectors/ResourcePathInjector.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ private List<Resource> getResources(ResourceResolver resolver, String[] paths, S
117117
if (resource != null) {
118118
resources.add(resource);
119119
} else {
120-
LOG.warn(
121-
"Could not retrieve resource at path {} for field {}. Since it is required it won't be injected.",
122-
path,
123-
fieldName);
120+
LOG.debug("Could not retrieve resource at path {} for field {}.", path, fieldName);
124121
// all resources should've been injected. we stop
125122
return null;
126123
}

0 commit comments

Comments
 (0)