Logout.java

1
package control.utente;
2
3
import javax.servlet.ServletException;
4
import javax.servlet.annotation.WebServlet;
5
import javax.servlet.http.HttpServlet;
6
import javax.servlet.http.HttpServletRequest;
7
import javax.servlet.http.HttpServletResponse;
8
import java.io.IOException;
9
10
@WebServlet("/Logout")
11
public class Logout extends HttpServlet {
12
    @Override
13
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
14 1 1. doPost : removed call to javax/servlet/http/HttpSession::invalidate → KILLED
        req.getSession().invalidate();
15 1 1. doPost : removed call to javax/servlet/http/HttpServletResponse::sendRedirect → KILLED
        resp.sendRedirect("index.jsp");
16
    }
17
18
    @Override
19
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
20 1 1. doGet : removed call to control/utente/Logout::doPost → KILLED
        doPost(req, resp);
21
    }
22
}

Mutations

14

1.1
Location : doPost
Killed by : control.utente.LogoutTest.[engine:junit-jupiter]/[class:control.utente.LogoutTest]/[method:doGet_delegatesToDoPost_sameEffectsAsPost()]
removed call to javax/servlet/http/HttpSession::invalidate → KILLED

15

1.1
Location : doPost
Killed by : control.utente.LogoutTest.[engine:junit-jupiter]/[class:control.utente.LogoutTest]/[method:doGet_delegatesToDoPost_sameEffectsAsPost()]
removed call to javax/servlet/http/HttpServletResponse::sendRedirect → KILLED

20

1.1
Location : doGet
Killed by : control.utente.LogoutTest.[engine:junit-jupiter]/[class:control.utente.LogoutTest]/[method:doGet_delegatesToDoPost_sameEffectsAsPost()]
removed call to control/utente/Logout::doPost → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.0