]> source.dussan.org Git - sonarqube.git/commit
Do not throw UnsupportedOperationException when httpRequest.getSession(false) is...
authorevernat <evernat@free.fr>
Sat, 15 Oct 2016 23:16:03 +0000 (01:16 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 19 Oct 2016 09:58:08 +0000 (11:58 +0200)
commit836937cefabadd635c559c583ef8fa779068af80
tree70ede19f0386e34b4be12f1f9f08eb2473b53a1f
parent8230c2a229c2ac7c59cee2ea28e56da7dd2b9f74
Do not throw UnsupportedOperationException when httpRequest.getSession(false) is called

When httpRequest.getSession(false) is called, the callers does not ask to create a http session. (javadoc of HttpServletRequest: "If create is false and the request has no valid HttpSession, this method returns null.")

So throwing UnsupportedOperationException is not needed in this case and returning null is enough.

This will fix a [blocking issue](https://github.com/javamelody/sonar-javamelody/issues/4) in the [Sonar JavaMelody plugin](https://github.com/javamelody/javamelody/wiki/UserGuide#sonar-plugin).
server/sonar-server/src/main/java/org/sonar/server/platform/web/RootFilter.java