Stack trace given at the end. When client uses $select and specifies properties of related entities it's possible for the result to have link with empty content. This causes NullPointerException in OData4J
java.lang.NullPointerException
at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:338) ~[odata4j-core-0.7.0.jar:?]
at org.odata4j.format.xml.AtomFeedFormatParser.parseAtomLink(AtomFeedFormatParser.java:266) ~[odata4j-core-0.7.0.jar:?]
at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:369) ~[odata4j-core-0.7.0.jar:?]
at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:169) ~[odata4j-core-0.7.0.jar:?]
at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:157) ~[odata4j-core-0.7.0.jar:?]
at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:45) ~[odata4j-core-0.7.0.jar:?]
Stack trace given at the end. When client uses $select and specifies properties of related entities it's possible for the result to have link with empty content. This causes NullPointerException in OData4J
Example atom feed to reproduce the issue <?xml version="1.0" encoding="utf-8"?> <feed xml:base="https://example.com/Repository/Data/MyEntities.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
java.lang.NullPointerException at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:338) ~[odata4j-core-0.7.0.jar:?] at org.odata4j.format.xml.AtomFeedFormatParser.parseAtomLink(AtomFeedFormatParser.java:266) ~[odata4j-core-0.7.0.jar:?] at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:369) ~[odata4j-core-0.7.0.jar:?] at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:169) ~[odata4j-core-0.7.0.jar:?] at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:157) ~[odata4j-core-0.7.0.jar:?] at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:45) ~[odata4j-core-0.7.0.jar:?]