Skip to content

Commit

Permalink
Migrate example to StaplerRequest2 & StaplerResponse2 (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-kamal2004 authored Jan 3, 2025
1 parent 515e042 commit 7262feb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions core/maven-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
</dependency>

<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0</version>
<version>5.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions core/maven-example/src/main/java/example/Book.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import jakarta.servlet.ServletException;
import java.io.IOException;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;

/**
* A book in the bookstore.
Expand Down Expand Up @@ -33,7 +33,7 @@ public String getIsbn() {
/**
* Defines an action to delete this book from the store.
*/
public void doDelete( StaplerRequest request, StaplerResponse response ) throws IOException, ServletException {
public void doDelete( StaplerRequest2 request, StaplerResponse2 response ) throws IOException, ServletException {
BookStore.theStore.getItems().remove(getSku());
response.sendRedirect(request.getContextPath()+'/');
}
Expand Down

0 comments on commit 7262feb

Please sign in to comment.