• R/O
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscapheguic翻訳omegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revision2132 (tree)
Zeit2020-09-17 09:50:55
Autort_nakayama1971

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/framework/fwOnline/src/main/java/online/listener/CrossContextRequestListener.java (revision 2131)
+++ trunk/framework/fwOnline/src/main/java/online/listener/CrossContextRequestListener.java (revision 2132)
@@ -5,7 +5,6 @@
55 import java.util.function.Consumer;
66
77 import javax.servlet.ServletContext;
8-import javax.servlet.ServletRequest;
98 import javax.servlet.ServletRequestEvent;
109 import javax.servlet.ServletRequestListener;
1110 import javax.servlet.http.HttpServletRequest;
@@ -41,19 +40,20 @@
4140 @Override
4241 public void requestInitialized(final ServletRequestEvent sre) {
4342 setParamsName(sre.getServletContext());
44- setToSession(sre.getServletRequest());
43+ if (sre.getServletRequest() instanceof HttpServletRequest request) {
44+ setToSession(request);
45+ }
4546 }
4647
4748 /**
4849 * セッションに設定する。
4950 *
50- * @param svRequest ServletRequest
51+ * @param request HttpServletRequest
5152 * @return セッションに設定した場合 true を返す。
5253 */
53- private boolean setToSession(final ServletRequest svRequest) {
54- return (svRequest instanceof HttpServletRequest request)
55- && (updateSessionAttribute(request.getServletContext(), request.getSession(false))
56- || updateSessionAttribute(request.getServletContext(), request.getSession()));
54+ private boolean setToSession(final HttpServletRequest request) {
55+ return updateSessionAttribute(request.getServletContext(), request.getSession(false))
56+ || updateSessionAttribute(request.getServletContext(), request.getSession());
5757 }
5858
5959 /**