DATACMNS-899 - Fix recursion in ParameterizedTypeInformation.getMapValueType().

Previously, calls to ParameterizedTypeInformation.getMapValueType() caused an infinite recursion when invoked on a type information that was not a map type. This lead to a StackOverflowError.

We now call the super method doGetMapValueType() instead of calling the entry super method getMapValueType() and return by that null in case the map value type is not resolvable.

Original pull request: #176.
This commit is contained in:
Mark Paluch
2016-08-30 16:45:21 +02:00
committed by Oliver Gierke
parent ac51b1671d
commit 2b14d1ea54
2 changed files with 22 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 the original author or authors.
* Copyright 2011-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.
@@ -32,6 +32,7 @@ import org.springframework.util.StringUtils;
* class we will have to resolve generic parameters against.
*
* @author Oliver Gierke
* @author Mark Paluch
*/
class ParameterizedTypeInformation<T> extends ParentTypeAwareTypeInformation<T> {
@@ -85,7 +86,7 @@ class ParameterizedTypeInformation<T> extends ParentTypeAwareTypeInformation<T>
}
}
return super.getMapValueType();
return super.doGetMapValueType();
}
/*