Skip to content

Commit

Permalink
Migrate from EE 8 to EE 9
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Jan 27, 2025
1 parent f93deb5 commit 771665a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>9.0.0</version>
<version>10.2.0</version>
<relativePath />
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import edu.hm.hafner.echarts.ChartModelConfiguration;
import edu.hm.hafner.echarts.JacksonFacade;

import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;
import org.kohsuke.stapler.bind.JavaScriptMethod;
import hudson.model.Api;
import hudson.model.ModelObject;
Expand Down Expand Up @@ -576,7 +576,7 @@ public String getDisplayName() {
* @return the new subpage
*/
@SuppressWarnings("unused") // Called by jelly view
public Object getDynamic(final String link, final StaplerRequest request, final StaplerResponse response) {
public Object getDynamic(final String link, final StaplerRequest2 request, final StaplerResponse2 response) {
try {
return new DetailFactory().createTrendDetails(link, owner, result,
report, newIssues, outstandingIssues, fixedIssues,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import edu.hm.hafner.echarts.JacksonFacade;
import edu.umd.cs.findbugs.annotations.CheckForNull;

import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;
import org.kohsuke.stapler.bind.JavaScriptMethod;
import hudson.model.Action;
import hudson.model.Job;
Expand Down Expand Up @@ -151,7 +151,7 @@ public String getUrlName() {
* in case of an error
*/
@SuppressWarnings("unused") // Called by jelly view
public void doIndex(final StaplerRequest request, final StaplerResponse response) throws IOException {
public void doIndex(final StaplerRequest2 request, final StaplerResponse2 response) throws IOException {
Optional<ResultAction> action = getLatestAction();
if (action.isPresent()) {
response.sendRedirect2(String.format("../%d/%s", action.get().getOwner().getNumber(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import org.junit.jupiter.api.Test;

import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;
import hudson.model.Job;
import hudson.model.Run;

Expand Down Expand Up @@ -69,8 +69,8 @@ void shouldShowIconIfThereIsABuildResultAvailable() throws IOException {
assertThat(action.isTrendEmpty()).isFalse();
assertThat(action.isTrendVisible()).isTrue();

StaplerResponse response = mock(StaplerResponse.class);
action.doIndex(mock(StaplerRequest.class), response);
StaplerResponse2 response = mock(StaplerResponse2.class);
action.doIndex(mock(StaplerRequest2.class), response);

verify(response).sendRedirect2("../0/" + ANALYSIS_ID);

Expand All @@ -84,8 +84,8 @@ void shouldRedirect() throws IOException {
Job<?, ?> job = mock(Job.class);
JobAction action = new JobAction(job, labelProvider, 1);

StaplerRequest request = mock(StaplerRequest.class);
action.doIndex(request, mock(StaplerResponse.class));
StaplerRequest2 request = mock(StaplerRequest2.class);
action.doIndex(request, mock(StaplerResponse2.class));

verifyNoInteractions(request);
}
Expand Down

0 comments on commit 771665a

Please sign in to comment.