See gh-15695
This commit is contained in:
Johnny Lim
2019-01-14 16:54:04 +09:00
committed by Stephane Nicoll
parent b22561877d
commit af3ed9ff9f
10 changed files with 25 additions and 34 deletions

View File

@@ -97,7 +97,7 @@ class SpringBootTestRandomPortEnvironmentPostProcessor
return environment.getConversionService().convert(value, Integer.class);
}
catch (ConversionFailedException ex) {
if (ClassUtils.isAssignable(value.getClass(), String.class)) {
if (value instanceof String) {
return getResolvedValueIfPossible(environment, (String) value);
}
throw ex;