diff --git a/src/main/java/org/springframework/data/repository/support/DomainClassConverter.java b/src/main/java/org/springframework/data/repository/support/DomainClassConverter.java index 217ab033d..7362b247b 100644 --- a/src/main/java/org/springframework/data/repository/support/DomainClassConverter.java +++ b/src/main/java/org/springframework/data/repository/support/DomainClassConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2015 the original author or authors. + * Copyright 2008-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,8 +39,8 @@ import org.springframework.util.StringUtils; * @author Oliver Gierke * @author Thomas Darimont */ -public class DomainClassConverter implements - ConditionalGenericConverter, ApplicationContextAware { +public class DomainClassConverter + implements ConditionalGenericConverter, ApplicationContextAware { private final T conversionService; private Repositories repositories = Repositories.NONE; @@ -73,8 +73,9 @@ public class DomainClassConverter rawIdType = repositories.getRepositoryInformationFor(targetType.getType()).getIdType(); - if (sourceType.equals(TypeDescriptor.valueOf(rawIdType)) - || conversionService.canConvert(sourceType.getType(), rawIdType)) { - return true; - } - - // Throw an exception to indicate it should have matched an no further resolution should be tried - throw new ConversionMatchAbbreviationException(); + return sourceType.equals(TypeDescriptor.valueOf(rawIdType)) + || conversionService.canConvert(sourceType.getType(), rawIdType); } } @@ -246,7 +239,4 @@ public class DomainClassConverter