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 65ad7cd commit 7323b95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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() {

Expand Down

0 comments on commit 7323b95

Please sign in to comment.