abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Ancona (JIRA)" <j...@apache.org>
Subject [jira] Created: (ABDERA-87) Null ResponseContext in call to AbstractServiceProvider.end()
Date Wed, 09 Jan 2008 19:30:34 GMT
Null ResponseContext in call to AbstractServiceProvider.end()
-------------------------------------------------------------

                 Key: ABDERA-87
                 URL: https://issues.apache.org/jira/browse/ABDERA-87
             Project: Abdera
          Issue Type: Bug
    Affects Versions: 0.4.0
            Reporter: Jim Ancona


Several of the calls to the end() method in AbstractServiceProvider have a null ResponseContext
 parameter because of the way the try/finally blocks are coded. This bug also affects calls
to CollectionProvider.end()

For example:
public ResponseContext getEntry(RequestContext request) {
      CollectionProvider provider = null;
      ResponseContext response = null;
      try {
        IRI entryBaseIri = resolveBase(request).resolve("./");
        provider = getCollectionProvider(request);
        provider.begin(request);
        
        return provider.getEntry(request, entryBaseIri);
      } catch (ResponseContextException e) {
        response = createErrorResponse(e);
        return response;
      } finally {
        end(provider, request, response);
      }
    }

should be:

    public ResponseContext getEntry(RequestContext request) {
      CollectionProvider provider = null;
      ResponseContext response = null;
      try {
        IRI entryBaseIri = resolveBase(request).resolve("./");
        provider = getCollectionProvider(request);
        provider.begin(request);
        
        response = provider.getEntry(request, entryBaseIri);
      } catch (ResponseContextException e) {
        response = createErrorResponse(e);
      } finally {
        end(provider, request, response);
      }
      return response;
    }



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message