Skip to content

Commit 948ab21

Browse files
committed
Aligned class name quoting with ConversionFailedException
(cherry picked from commit 7589c1f)
1 parent c56d1a6 commit 948ab21

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -57,10 +57,10 @@ public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class<?> r
5757
*/
5858
public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class<?> requiredType, Throwable cause) {
5959
super(propertyChangeEvent,
60-
"Failed to convert property value of type '" +
61-
ClassUtils.getDescriptiveType(propertyChangeEvent.getNewValue()) + "'" +
60+
"Failed to convert property value of type [" +
61+
ClassUtils.getDescriptiveType(propertyChangeEvent.getNewValue()) + "]" +
6262
(requiredType != null ?
63-
" to required type '" + ClassUtils.getQualifiedName(requiredType) + "'" : "") +
63+
" to required type [" + ClassUtils.getQualifiedName(requiredType) + "]" : "") +
6464
(propertyChangeEvent.getPropertyName() != null ?
6565
" for property '" + propertyChangeEvent.getPropertyName() + "'" : ""),
6666
cause);
@@ -84,16 +84,16 @@ public TypeMismatchException(Object value, Class<?> requiredType) {
8484
* @param cause the root cause (may be {@code null})
8585
*/
8686
public TypeMismatchException(Object value, Class<?> requiredType, Throwable cause) {
87-
super("Failed to convert value of type '" + ClassUtils.getDescriptiveType(value) + "'" +
88-
(requiredType != null ? " to required type '" + ClassUtils.getQualifiedName(requiredType) + "'" : ""),
87+
super("Failed to convert value of type [" + ClassUtils.getDescriptiveType(value) + "]" +
88+
(requiredType != null ? " to required type [" + ClassUtils.getQualifiedName(requiredType) + "]" : ""),
8989
cause);
9090
this.value = value;
9191
this.requiredType = requiredType;
9292
}
9393

9494

9595
/**
96-
* Return the offending value (may be {@code null})
96+
* Return the offending value (may be {@code null}).
9797
*/
9898
@Override
9999
public Object getValue() {

0 commit comments

Comments
 (0)