Fix potential NullPointerException in ProjectionSerializer.

Fixes GH-1947.
This commit is contained in:
Oliver Drotbohm
2023-12-15 12:18:27 +01:00
parent 3be814674d
commit e612cd0b27
4 changed files with 25 additions and 8 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.data.rest.core.mapping;
import org.springframework.data.util.Streamable;
import org.springframework.lang.Nullable;
/**
* @author Oliver Gierke
@@ -28,6 +29,7 @@ public interface ResourceMappings extends Streamable<ResourceMetadata> {
* @param type must not be {@literal null}.
* @return the {@link ResourceMetadata} if available or {@literal null} otherwise.
*/
@Nullable
ResourceMetadata getMetadataFor(Class<?> type);
/**