import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
public class Main {
public void test(HttpServletRequest request) {
// test with Array
HttpSession session = request.getSession();
session.setAttribute("test with array", new String[] { "1", "2" }); // Make "String[]" serializable or don't store it in the session
// test with List
List<String> list = new ArrayList<>();
session.setAttribute("test with list", list); // Make "List" serializable or don't store it in the session
}
}
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/4a843bf2-202a-414e-9db6-0135ad5a166f%40googlegroups.com.
Hello Michael,Is this issue including the fix for similar case squid:S1948 Fields in a "Serializable" class should either be transient or serializable ? I think they are the same case for taking collection as not serializable.
在 2016年8月6日星期六 UTC+8上午1:08:35,Michael Gumowski写道:
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/4a843bf2-202a-414e-9db6-0135ad5a166f%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/710c84b5-c6b7-4669-9ddc-68f66a631da7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/5a10bd29-b6c4-4480-aee4-af873e4c7acb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.