Skip to content

Commit

Permalink
DATAREST-1198 - Polishing.
Browse files Browse the repository at this point in the history
Fixed @SInCE tag in new converter implementation as we're going to backport the fix to Kay. Simplified converter setup in RepositoryRestMvcConfiguration to expose less API until someone actually requests access.

Original pull request: #290.
  • Loading branch information
odrotbohm committed Jun 13, 2018
1 parent dc22044 commit 70eafa5
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
* {@link Converter} to convert a {@link String} to a {@link LdapName}.
*
* @author Mark Paluch
* @since 3.1
* @since 3.0.8
*/
public enum StringToLdapNameConverter implements Converter<String, Name> {

Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@
*/
package org.springframework.data.rest.webmvc.config;

import javax.naming.Name;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -44,7 +43,6 @@
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.core.Ordered;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.converter.Converter;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.auditing.AuditableBeanWrapperFactory;
import org.springframework.data.auditing.MappingAuditableBeanWrapperFactory;
@@ -250,7 +248,7 @@ public DefaultFormattingConversionService defaultConversionService() {
DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();
// Add Spring Data Commons formatters
conversionService.addConverter(uriToEntityConverter(conversionService));
conversionService.addConverter(stringToNameConverter());
conversionService.addConverter(StringToLdapNameConverter.INSTANCE);
addFormatters(conversionService);

configurerDelegate.configureConversionService(conversionService);
@@ -677,10 +675,6 @@ protected UriToEntityConverter uriToEntityConverter(ConversionService conversion
return new UriToEntityConverter(persistentEntities(), repositoryInvokerFactory(conversionService), repositories());
}

protected Converter<String, ? extends Name> stringToNameConverter() {
return StringToLdapNameConverter.INSTANCE;
}

@Bean
public ExcerptProjector excerptProjector() {

0 comments on commit 70eafa5

Please sign in to comment.