From issues-return-31874-archive-asf-public=cust-asf.ponee.io@struts.apache.org Thu Feb 22 19:57:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9522718067E for ; Thu, 22 Feb 2018 19:57:04 +0100 (CET) Received: (qmail 13523 invoked by uid 500); 22 Feb 2018 18:57:03 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 13513 invoked by uid 99); 22 Feb 2018 18:57:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2018 18:57:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 11707C0145 for ; Thu, 22 Feb 2018 18:57:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id v0mVU11vMxH1 for ; Thu, 22 Feb 2018 18:57:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 84BE15F260 for ; Thu, 22 Feb 2018 18:57:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A45D6E0226 for ; Thu, 22 Feb 2018 18:57:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 249E327133 for ; Thu, 22 Feb 2018 18:57:00 +0000 (UTC) Date: Thu, 22 Feb 2018 18:57:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4921) NPE in I18nInterceptor$SessionLocaleHandler.read MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-4921?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1637324= 8#comment-16373248 ]=20 ASF GitHub Bot commented on WW-4921: ------------------------------------ yasserzamani opened a new pull request #213: WW-4921 revert I18nInterceptor= logic from WW-4741 changes=E2=80=A6 URL: https://github.com/apache/struts/pull/213 =20 =20 =E2=80=A6 to it's previous stable logic =20 WW-4741 changes logic which breaks WW-4921. This commit if applied, will= revert the logic to previous stable state but keeps WW-4741 fixed and also= will fix WW-4921. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > NPE in I18nInterceptor$SessionLocaleHandler.read > ------------------------------------------------ > > Key: WW-4921 > URL: https://issues.apache.org/jira/browse/WW-4921 > Project: Struts 2 > Issue Type: Bug > Components: Core Interceptors > Reporter: Michael Hintenaus > Priority: Major > Labels: test > Fix For: 2.5.16 > > > Calling > {code:java} > getActionProxy("/index.action").getInvocation().invoke(){code} > in a TestCase which extends from StrutsJUnit4TestCase will lead to a Null= PointerException. > Overriding getActionProxy like this will help: > {code:java} > @Override > =C2=A0=C2=A0 =C2=A0protected ActionProxy getActionProxy(final String uri)= { > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0final ActionProxy proxy =3D super.g= etActionProxy(uri); > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0final ActionContext context =3D pro= xy.getInvocation().getInvocationContext(); > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0if (context.getSession() =3D=3D nul= l) { > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0context.setSessi= on(new SessionMap<>(request));=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0} > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0return proxy; > =C2=A0=C2=A0 =C2=A0}{code} > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)