odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/XmlErrorDocumentDeserializer.java [60:89]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException {
    XMLStreamReader reader = null;
    EntityProviderException cachedException = null;

    try {
      reader = XmlHelper.createStreamReader(errorDocument);
      return parserError(reader);
    } catch (XMLStreamException e) {
      cachedException = new EntityProviderException(EntityProviderException.INVALID_STATE.addContent(
          e.getMessage()), e);
      throw cachedException;
    } catch (EntityProviderException e) {
      cachedException = e;
      throw cachedException;
    } finally {//NOPMD  - suppressed
      if (reader != null) {
        try {
          reader.close();
        } catch (XMLStreamException e) {
          if (cachedException != null) {
            throw cachedException; //NOSONAR
          } else {
            throw new EntityProviderException( //NOSONAR
                EntityProviderException.EXCEPTION_OCCURRED.addContent(
                    e.getClass().getSimpleName()), e); 
          }
        }
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlErrorDocumentConsumer.java [60:89]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException {
    XMLStreamReader reader = null;
    EntityProviderException cachedException = null;

    try {
      reader = XmlHelper.createStreamReader(errorDocument);
      return parserError(reader);
    } catch (XMLStreamException e) {
      cachedException = new EntityProviderException(EntityProviderException.INVALID_STATE.addContent(
          e.getMessage()), e);
      throw cachedException;
    } catch (EntityProviderException e) {
      cachedException = e;
      throw cachedException;
    } finally {// NOPMD (suppress DoNotThrowExceptionInFinally)
      if (reader != null) {
        try {
          reader.close();
        } catch (XMLStreamException e) {
          if (cachedException != null) {
            throw cachedException;
          } else {
            throw new EntityProviderException(
                EntityProviderException.EXCEPTION_OCCURRED.addContent(
                    e.getClass().getSimpleName()), e);
          }
        }
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



