DATACMNS-309 - Fixed lookup of nested properties on TypeDiscoverer.

So far the property lookup of a nested property path (e.g. "foo.bar") failed in cases the head property was not cached already. We now recursively resolve the type information even for an unpopulated cache.
This commit is contained in:
Oliver Gierke
2013-04-05 20:42:31 +02:00
parent 64dada5896
commit a7820c8cc6
2 changed files with 26 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011-2012 the original author or authors.
* Copyright 2011-2013 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.
@@ -177,7 +177,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> {
}
String head = fieldname.substring(0, separatorIndex);
TypeInformation<?> info = fieldTypes.get(head);
TypeInformation<?> info = getProperty(head);
return info == null ? null : info.getProperty(fieldname.substring(separatorIndex + 1));
}