I am a bit at loss how you would get an empty node list. There is no way to construct a PathImpl which has an empty nodeList. Maybe I am missing something. Could you provide a test case and/or a full stack trace?