Fixed bug in Property.
This commit is contained in:
@@ -285,7 +285,7 @@ public class Property {
|
||||
IllegalArgumentException exception = null;
|
||||
|
||||
try {
|
||||
return new Property(source, type);
|
||||
return new Property(source, type, addTail);
|
||||
} catch (IllegalArgumentException e) {
|
||||
exception = e;
|
||||
}
|
||||
@@ -299,7 +299,7 @@ public class Property {
|
||||
String head = source.substring(0, position);
|
||||
String tail = source.substring(position);
|
||||
|
||||
return new Property(head, type, tail + addTail);
|
||||
return create(head, type, tail + addTail);
|
||||
}
|
||||
|
||||
throw exception;
|
||||
|
||||
@@ -123,6 +123,12 @@ public class PropertyUnitTests {
|
||||
|
||||
Property.from("userMapMame", Bar.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findsNested() {
|
||||
|
||||
Property from = Property.from("barUserName", Sample.class);
|
||||
}
|
||||
|
||||
private class Foo {
|
||||
|
||||
@@ -146,6 +152,7 @@ public class PropertyUnitTests {
|
||||
|
||||
private String userName;
|
||||
private FooBar user;
|
||||
private Bar bar;
|
||||
}
|
||||
|
||||
private class Sample2 {
|
||||
|
||||
Reference in New Issue
Block a user