Phoenixasuga / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

AbstractAtomFeedParser causes NullPointerException #314

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
version 1.5.0-beta

Describe the problem.

parseNextEntry method is passing null into Xml.parseElement(); when feedParsed 
is false, instead of destination object, which causes NPE in 
context.add(destination.getClass());

  public Object parseNextEntry() throws IOException, XmlPullParserException {
    if (!feedParsed) {
      feedParsed = true;
      Xml.parseElement(parser, null, namespaceDictionary, Atom.StopAtAtomEntry.INSTANCE);
    }

java.lang.NullPointerException
    at com.google.api.client.xml.Xml.parseElement(Xml.java:202)
    at com.google.api.client.xml.atom.AbstractAtomFeedParser.parseNextEntry(AbstractAtomFeedParser.java:170)
    at com.google.api.client.http.xml.atom.AtomFeedParser.parseNextEntry(AtomFeedParser.java:79)

How would you expect it to be fixed?

Well I don't see a reason why the feed should be parsed before, why not just 
having parsing method that retrieves feed entries ?

Original issue reported on code.google.com by liska.jakub on 7 Oct 2011 at 11:13

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 14 Jan 2013 at 3:31

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 14 Jan 2013 at 4:08