Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12284

UserGroupInformation doAs can throw misleading exception

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • security
    • None
    • Patch

    Description

      If doAs() catches a PrivilegedActionException it extracts the underlying cause through getCause and then re-throws an exception based on the class of the Cause. If getCause returns null, this is how it gets re-thrown:

      else

      { throw new UndeclaredThrowableException(cause); }

      If cause == null that seems misleading. I have seen actual instances where cause is null, so this isn't just a theoretical concern.

      Attachments

        1. HADOOP-12284-005.patch
          1.0 kB
          Aaron Dossett
        2. HADOOP-12284-004.patch
          1.0 kB
          Aaron Dossett
        3. HADOOP-12284-003.patch
          1 kB
          Aaron Dossett
        4. HADOOP-12284-002.patch
          1 kB
          Steve Loughran
        5. HADOOP-12284.example
          3 kB
          Aaron Dossett
        6. HADOOP-12284.patch
          1.0 kB
          Aaron Dossett

        Activity

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

          People

            dossett Aaron Blake Niskode-Dossett
            dossett@gmail.com Aaron Dossett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment