Closed
Description
String path = "bbsCc.Name";
PropertyPath from = PropertyPath.from(path, Aa.class);
System.out.println(from.toString()); // => Aa.bbs.name, The correct result should be Aa.bbs.cc.name
PropertyPath.java
private static PropertyPath create(String source, Stack<PropertyPath> base) {
PropertyPath previous = base.peek(); // => PropertyPath previous = base.peek().getLeafProperty();
PropertyPath propertyPath = create(source, previous.type, base);
previous.next = propertyPath;
return propertyPath;
}
class
class Aa{
private String name;
private Set<Bb> bbs;
...setter/getter...
}
class Bb {
private String name;
private Cc cc;
...setter/getter...
}
class Cc {
private String name;
...setter/getter...
}