Fix NPE
See: https://github.com/spring-projects/sts4/issues/59#issuecomment-397569150 Signed-off-by: Kris De Volder <kdevolder@pivotal.io>
This commit is contained in:
@@ -90,7 +90,7 @@ public class IndexNavigator {
|
||||
// the index is at the 'root' of the tree and we don't need a '.' to navigate
|
||||
String extendedPrefix = prefix==null?"":prefix + NAV_CHAR;
|
||||
PropertyInfo candidate = index.findLongestCommonPrefixEntry(extendedPrefix);
|
||||
if (candidate.getId().startsWith(extendedPrefix)) {
|
||||
if (candidate!=null && candidate.getId().startsWith(extendedPrefix)) {
|
||||
return candidate;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user