Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-3

NPE guard for missing Accept headers

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • V2 1.0.0
    • odata2-core
    • None
    • 1.0.0-SNAPSHOT

    Description

      org.apache.olingo.odata2.core.rest.RestUtil's extractAcceptHeaders is not guarding against an NPE for the missing accept headers.

      cxf-2.7.x currently returns an empty list in this case, therefore it does not lead to an issue. However, the correct behavior is to return a null in this case.

      https://java.net/jira/browse/JAX_RS_SPEC-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=359530#action_359530

      Therefore, the above method should guard against an NPE for the acceptHeaders variable being null.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            klevenzs Stephan Klevenz
            ay Akitoshi Yoshida
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment