DATACMNS-387 - Improvements in null handling in PartTree area.

We're now rejecting invalid constructor arguments handed to ClassTypeInformation, Part, PartTree and PropertyPath. Beyond that we skip the creation of a Part for an empty path segment, so that you don't end up with an invalid Part instance for a findAllByOrderByFooAsc.
This commit is contained in:
Oliver Gierke
2013-10-27 16:21:01 +01:00
parent 1624fec11a
commit ae9ee5b428
7 changed files with 79 additions and 19 deletions

View File

@@ -277,6 +277,14 @@ public class ClassTypeInformationUnitTests {
assertThat(categoryIdInfo, is((TypeInformation) from(Long.class)));
}
/**
* @see DATACMNS-387
*/
@Test(expected = IllegalArgumentException.class)
public void rejectsNullClass() {
from(null);
}
static class StringMapContainer extends MapContainer<String> {
}