improved conversion system logging, collection converter simplification/polish, several optimizations, annotation-driven formatting caching

This commit is contained in:
Keith Donald
2010-04-17 04:43:28 +00:00
parent bf1a95c771
commit 64d6a42dfd
23 changed files with 263 additions and 379 deletions

View File

@@ -72,7 +72,7 @@ public class TypedValue {
@Override
public String toString() {
StringBuilder str = new StringBuilder();
str.append("TypedValue: ").append(this.value).append(" of type ").append(this.getTypeDescriptor().asString());
str.append("TypedValue: ").append(this.value).append(" of ").append(this.getTypeDescriptor());
return str.toString();
}

View File

@@ -29,12 +29,12 @@ import org.springframework.expression.ParseException;
import org.springframework.expression.PropertyAccessor;
import org.springframework.expression.TypedValue;
import org.springframework.expression.spel.ast.FormatHelper;
import org.springframework.expression.spel.standard.SpelExpression;
import org.springframework.expression.spel.support.ReflectionHelper;
import org.springframework.expression.spel.support.ReflectivePropertyAccessor;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.expression.spel.support.StandardTypeConverter;
import org.springframework.expression.spel.support.ReflectionHelper.ArgsMatchKind;
import org.springframework.expression.spel.standard.SpelExpression;
/**
* Tests for any helper code.
@@ -94,7 +94,7 @@ public class HelperTests extends ExpressionTestCase {
public void testTypedValue() {
TypedValue tValue = new TypedValue("hello");
Assert.assertEquals(String.class,tValue.getTypeDescriptor().getType());
Assert.assertEquals("TypedValue: hello of type java.lang.String",tValue.toString());
Assert.assertEquals("TypedValue: hello of [TypeDescriptor java.lang.String]",tValue.toString());
}
@Test