-
Bug
-
Resolution: Unresolved
-
Minor
-
None
https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/scm/ScmContainer.java is a class annotated with @Extension and calls Stapler#getCurrentRequest in the parameter-less constructor that will be called by extension lookup.
It is an incorrect assumption that extension lookup (and therefore instantiation of annotated types) only happens during HTTP requests.
[JENKINS-72614] ScmContainer improperly assumes request context for @Extension instantiation
Description |
Original:
[https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/scm/ScmContainer.java] is a class annotated with {{@Extension}} and calls {{Stapler#getCurrentRequest}} in the parameter-less constructor that will be called by extension lookup.
It is an improper assumption that extension lookup (and therefore instantiation of annotated types) only happens during HTTP requests. |
New:
[https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/scm/ScmContainer.java] is a class annotated with {{@Extension}} and calls {{Stapler#getCurrentRequest}} in the parameter-less constructor that will be called by extension lookup.
It is an incorrect assumption that extension lookup (and therefore instantiation of annotated types) only happens during HTTP requests. |