From issues-return-14176-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Mon Nov 02 18:45:14 2009 Return-Path: Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: (qmail 38378 invoked from network); 2 Nov 2009 18:45:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Nov 2009 18:45:14 -0000 Received: (qmail 76801 invoked by uid 500); 2 Nov 2009 18:45:14 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 76744 invoked by uid 500); 2 Nov 2009 18:45:13 -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 76736 invoked by uid 99); 2 Nov 2009 18:45:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 18:45:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 18:45:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 225C4234C495 for ; Mon, 2 Nov 2009 10:44:50 -0800 (PST) Message-ID: <738659353.1257187490138.JavaMail.jira@brutus> Date: Mon, 2 Nov 2009 10:44:50 -0800 (PST) From: "Musachy Barroso (JIRA)" To: issues@struts.apache.org Subject: [jira] Commented: (WW-3306) Null value accepted from action property, but not model property when throwExceptionOnFailure=true In-Reply-To: <671264498.1256821130168.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 2265bf7ad70cb93affdfde3e15287371 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/struts/browse/WW-3306?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D47021= #action_47021 ]=20 Musachy Barroso commented on WW-3306: ------------------------------------- Confirmed. The problem is that the code that check for the missing property= only checks the actions, if the action is ModelDriven, it doesn't check th= e model. I also found what it seems like another bug, this code in xwork: for (Object o : root) { if (o instanceof ActionSupport || o.getClass().getSimpleNam= e().endsWith("Action")) { try { findAvailableProperties(o.getClass(), expr, availab= leProperties, null); } catch (IntrospectionException ise) { // ignore } } } it should check all objects in the stack, not only "o instanceof ActionSupp= ort || o.getClass().getSimpleName().endsWith("Action")" > Null value accepted from action property, but not model property when thr= owExceptionOnFailure=3Dtrue > -------------------------------------------------------------------------= ------------------------- > > Key: WW-3306 > URL: https://issues.apache.org/struts/browse/WW-3306 > Project: Struts 2 > Issue Type: Bug > Components: Value Stack > Affects Versions: 2.2.0 > Reporter: Andreas Kr=C3=BCger > > In this project, we experiment with setting struts.el.throwExceptionOnFai= lure=3Dtrue to catch errors. > We use in our JSP. > Occasionally, the property thus referenced is null. We want struts to ins= ert an empty string in that case. > This it duely does, when either struts.el.throwExceptionOnFailure=3Dfalse= or when the property is from an action object. > However, if the property is from a model object and struts.el.throwExcept= ionOnFailure=3Dtrue, this bombs out. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.