|
51 | 51 | import org.kohsuke.stapler.HttpResponse; |
52 | 52 | import org.kohsuke.stapler.QueryParameter; |
53 | 53 | import org.kohsuke.stapler.Stapler; |
54 | | -import org.kohsuke.stapler.StaplerRequest; |
55 | | -import org.kohsuke.stapler.StaplerResponse; |
| 54 | +import org.kohsuke.stapler.StaplerRequest2; |
| 55 | +import org.kohsuke.stapler.StaplerResponse2; |
56 | 56 | import org.kohsuke.stapler.export.Exported; |
57 | 57 | import org.kohsuke.stapler.export.ExportedBean; |
58 | 58 | import org.kohsuke.stapler.interceptor.RequirePOST; |
@@ -188,7 +188,7 @@ public String getRelativePathFrom(TestObject it) { |
188 | 188 | buf.insert(0, myBuild.getUrl()); |
189 | 189 |
|
190 | 190 | // If we're inside a stapler request, just delegate to Hudson.Functions to get the relative path! |
191 | | - StaplerRequest req = Stapler.getCurrentRequest(); |
| 191 | + StaplerRequest2 req = Stapler.getCurrentRequest2(); |
192 | 192 | if (req != null && myBuild instanceof Item) { |
193 | 193 | buf.insert(0, '/'); |
194 | 194 | // Ugly but I don't see how else to convince the compiler that myBuild is an Item |
@@ -227,7 +227,7 @@ public AbstractTestResultAction getTestResultAction() { |
227 | 227 | if (owner != null) { |
228 | 228 | return owner.getAction(AbstractTestResultAction.class); |
229 | 229 | } else { |
230 | | - Run<?, ?> run = Stapler.getCurrentRequest().findAncestorObject(Run.class); |
| 230 | + Run<?, ?> run = Stapler.getCurrentRequest2().findAncestorObject(Run.class); |
231 | 231 | if (run != null) { |
232 | 232 | return run.getAction(AbstractTestResultAction.class); |
233 | 233 | } |
@@ -462,7 +462,7 @@ public History getHistory() { |
462 | 462 | return new History(this); |
463 | 463 | } |
464 | 464 |
|
465 | | - public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) { |
| 465 | + public Object getDynamic(String token, StaplerRequest2 req, StaplerResponse2 rsp) { |
466 | 466 | for (Action a : getTestActions()) { |
467 | 467 | if (a == null) { |
468 | 468 | continue; // be defensive |
|
0 commit comments