|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2009 the original author or authors. |
|
|
|
* Copyright 2002-2010 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -17,6 +17,8 @@ |
|
|
|
package org.springframework.beans; |
|
|
|
package org.springframework.beans; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.core.MethodParameter; |
|
|
|
import org.springframework.core.MethodParameter; |
|
|
|
|
|
|
|
import org.springframework.core.convert.ConversionException; |
|
|
|
|
|
|
|
import org.springframework.core.convert.ConverterNotFoundException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Simple implementation of the TypeConverter interface that does not operate |
|
|
|
* Simple implementation of the TypeConverter interface that does not operate |
|
|
|
@ -46,12 +48,18 @@ public class SimpleTypeConverter extends PropertyEditorRegistrySupport implement |
|
|
|
try { |
|
|
|
try { |
|
|
|
return this.typeConverterDelegate.convertIfNecessary(value, requiredType, methodParam); |
|
|
|
return this.typeConverterDelegate.convertIfNecessary(value, requiredType, methodParam); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (IllegalArgumentException ex) { |
|
|
|
catch (ConverterNotFoundException ex) { |
|
|
|
|
|
|
|
throw new ConversionNotSupportedException(value, requiredType, ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (ConversionException ex) { |
|
|
|
throw new TypeMismatchException(value, requiredType, ex); |
|
|
|
throw new TypeMismatchException(value, requiredType, ex); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (IllegalStateException ex) { |
|
|
|
catch (IllegalStateException ex) { |
|
|
|
throw new ConversionNotSupportedException(value, requiredType, ex); |
|
|
|
throw new ConversionNotSupportedException(value, requiredType, ex); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
catch (IllegalArgumentException ex) { |
|
|
|
|
|
|
|
throw new TypeMismatchException(value, requiredType, ex); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|