committed by
Juergen Hoeller
parent
b449928691
commit
659f13be1c
@@ -49,8 +49,9 @@ public abstract class ParameterizedTypeReference<T> {
|
||||
Type type = parameterizedTypeReferenceSubclass.getGenericSuperclass();
|
||||
Assert.isInstanceOf(ParameterizedType.class, type, "Type must be a parameterized type");
|
||||
ParameterizedType parameterizedType = (ParameterizedType) type;
|
||||
Assert.isTrue(parameterizedType.getActualTypeArguments().length == 1, "Number of type arguments must be 1");
|
||||
this.type = parameterizedType.getActualTypeArguments()[0];
|
||||
Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
|
||||
Assert.isTrue(actualTypeArguments.length == 1, "Number of type arguments must be 1");
|
||||
this.type = actualTypeArguments[0];
|
||||
}
|
||||
|
||||
private ParameterizedTypeReference(Type type) {
|
||||
|
||||
@@ -62,7 +62,7 @@ public abstract class TransformerUtils {
|
||||
*/
|
||||
public static void enableIndenting(Transformer transformer, int indentAmount) {
|
||||
Assert.notNull(transformer, "Transformer must not be null");
|
||||
Assert.isTrue(indentAmount > -1, "The indent amount cannot be less than zero : got " + indentAmount);
|
||||
Assert.isTrue(indentAmount > -1, () -> "The indent amount cannot be less than zero : got " + indentAmount);
|
||||
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
|
||||
try {
|
||||
// Xalan-specific, but this is the most common XSLT engine in any case
|
||||
|
||||
Reference in New Issue
Block a user