Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36494

Use try with resources for impersonation

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Done
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      ACL.impersonate uses pre-java 7 patterns and either ends up with requiring a finally or requiring additional classloading.

      Much more efficient if we can do something like

      try (ACLContext _ = ACL.as(auth)) {
        // do some stuff as auth
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: