SilverHoodCorp / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

Internal Reason must not be null. #424

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. try to get the acl feed of a permanently deleted document

What is the expected output? What do you see instead?
expected: com.google.gdata.util.ResourceNotFoundException thrown
actual: java.lang.NullPointerException thrown

I get this xml:
<errors 
xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>Reso
urceNotFoundException</code><internalReason/></error></errors>

The internal reason in the response xml: <internalReason/>
This causes that the com.google.gdata.util.ErrorElement.setInternalReason 
method gets a null value which results a null pointer exception in the line 170 
Preconditions.checkNotNull(internalReason, "Internal Reason must not be null.");

What version of the product are you using? On what operating system?
gdata library version 1.47.1

Please provide any additional information below.

Original issue reported on code.google.com by tamas.to...@doctusoft.com on 25 Jan 2013 at 4:46

GoogleCodeExporter commented 9 years ago
Caused by: java.lang.NullPointerException: Internal Reason must not be null.
    at com.google.gdata.util.common.base.Preconditions.checkNotNull(Preconditions.java:204)
    at com.google.gdata.util.ErrorElement.setInternalReason(ErrorElement.java:170)
    at com.google.gdata.util.ServiceExceptionInitializer$InternalReasonHandler.processEndElement(ServiceExceptionInitializer.java:248)
    at com.google.gdata.util.XmlParser.endElement(XmlParser.java:1013)
    at org.xml.sax.helpers.ParserAdapter.endElement(ParserAdapter.java:626)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:694)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:585)
    at com.google.gdata.util.ServiceExceptionInitializer.parse(ServiceExceptionInitializer.java:132)
    at com.google.gdata.util.ServiceExceptionInitializer.parse(ServiceExceptionInitializer.java:119)
    at com.google.gdata.util.ServiceException.<init>(ServiceException.java:119)
    at com.google.gdata.util.ResourceNotFoundException.<init>(ResourceNotFoundException.java:48)
    at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:599)
    at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
    at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
    at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
    at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
    at com.google.gdata.client.Service.getFeed(Service.java:1135)
    at com.google.gdata.client.Service.getFeed(Service.java:998)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:645)
    at com.google.gdata.client.Service.getFeed(Service.java:1017)

Original comment by tamas.to...@doctusoft.com on 25 Jan 2013 at 4:51