araskind / jmzml

Automatically exported from code.google.com/p/jmzml
0 stars 0 forks source link

Unexpected behaviour of unmarshaller.unmarshalFromXpath for optional elements #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Files that do not contain a sampleLIst the call 
unmarshaller.unmarshalFromXpath("/sampleList", SampleList.class) throws an 
error.

What is the expected output?
For optional objects that should be indexed and are not present in the parsed 
file NULL should be returned.

Original issue reported on code.google.com by johannes...@gmail.com on 5 May 2011 at 8:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The above description was incorrect: In all cases where the XPath is not in the 
index NULL is returned.

For XPaths that will never be indexed an Exception should be thrown alerting 
the user that this call will never return an element.

Original comment by johannes...@gmail.com on 5 May 2011 at 9:09