DATAREST-1502 - Polishing.
Use diamond syntax where possible. Fix Javadoc.
This commit is contained in:
@@ -27,7 +27,6 @@ import org.springframework.data.mapping.PersistentProperty;
|
||||
import org.springframework.data.mapping.context.PersistentEntities;
|
||||
import org.springframework.data.util.ProxyUtils;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ConcurrentReferenceHashMap;
|
||||
|
||||
/**
|
||||
* {@link ResourceMappings} for {@link PersistentEntities}.
|
||||
@@ -43,7 +42,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
|
||||
|
||||
private final Map<Class<?>, ResourceMetadata> cache = new ConcurrentHashMap<>();
|
||||
private final Map<Class<?>, MappingResourceMetadata> mappingCache = new ConcurrentHashMap<>();
|
||||
private final Map<PersistentProperty<?>, ResourceMapping> propertyCache = new ConcurrentHashMap<PersistentProperty<?>, ResourceMapping>();
|
||||
private final Map<PersistentProperty<?>, ResourceMapping> propertyCache = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* Creates a new {@link PersistentEntitiesResourceMappings} from the given {@link PersistentEntities}.
|
||||
@@ -158,7 +157,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
|
||||
@Override
|
||||
public Iterator<ResourceMetadata> iterator() {
|
||||
|
||||
Set<ResourceMetadata> metadata = new HashSet<ResourceMetadata>();
|
||||
Set<ResourceMetadata> metadata = new HashSet<>();
|
||||
|
||||
for (ResourceMetadata candidate : cache.values()) {
|
||||
if (candidate != null) {
|
||||
|
||||
@@ -45,12 +45,11 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
|
||||
|
||||
/**
|
||||
* Creates a new {@link RepositoryResourceMappings} from the given {@link RepositoryRestConfiguration},
|
||||
* {@link Repositories} and {@link RelProvider}.
|
||||
* {@link PersistentEntities}, and {@link Repositories}.
|
||||
*
|
||||
* @param repositories must not be {@literal null}.
|
||||
* @param entities must not be {@literal null}.
|
||||
* @param strategy must not be {@literal null}.
|
||||
* @param relProvider must not be {@literal null}.
|
||||
* @param configuration must not be {@literal null}.
|
||||
*/
|
||||
public RepositoryResourceMappings(Repositories repositories, PersistentEntities entities,
|
||||
RepositoryRestConfiguration configuration) {
|
||||
@@ -65,7 +64,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
|
||||
this.populateCache(repositories, configuration);
|
||||
}
|
||||
|
||||
private final void populateCache(Repositories repositories, RepositoryRestConfiguration configuration) {
|
||||
private void populateCache(Repositories repositories, RepositoryRestConfiguration configuration) {
|
||||
|
||||
for (Class<?> type : repositories) {
|
||||
|
||||
@@ -151,7 +150,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
|
||||
/**
|
||||
* Returns whether to expose repository methods by default, i.e. without the need to explicitly annotate them with
|
||||
* {@link RestResource}.
|
||||
*
|
||||
*
|
||||
* @since 3.1
|
||||
* @see RepositoryRestConfiguration#exposeRepositoryMethodsByDefault()
|
||||
*/
|
||||
@@ -161,7 +160,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
|
||||
|
||||
/**
|
||||
* Returns the underlying {@link ExposureConfiguration}.
|
||||
*
|
||||
*
|
||||
* @return will never be {@literal null}.
|
||||
* @since 3.1
|
||||
* @see RepositoryRestConfiguration#getExposureConfiguration()
|
||||
|
||||
Reference in New Issue
Block a user