Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B37D61018C for ; Wed, 17 Jul 2013 15:12:57 +0000 (UTC) Received: (qmail 77981 invoked by uid 500); 17 Jul 2013 15:12:56 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 77948 invoked by uid 500); 17 Jul 2013 15:12:56 -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 77927 invoked by uid 99); 17 Jul 2013 15:12:56 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 15:12:56 +0000 Date: Wed, 17 Jul 2013 15:12:56 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4126) Incorrect behavior for ELSupport.containsNulls() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-4126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13711158#comment-13711158 ] ASF subversion and git services commented on WW-4126: ----------------------------------------------------- Commit 1504168 from [~bphillips] in branch 'struts2/trunk' [ https://svn.apache.org/r1504168 ] WW-4126 - changed logic of is statement so that every element in the Object array is compared to null > Incorrect behavior for ELSupport.containsNulls() > ------------------------------------------------ > > Key: WW-4126 > URL: https://issues.apache.org/jira/browse/WW-4126 > Project: Struts 2 > Issue Type: Bug > Components: Plugin - Embedded JSP > Affects Versions: 2.3.14.3 > Environment: any > Reporter: Adrian Nistor > Assignee: Bruce Phillips > Labels: patch > Fix For: 2.3.16 > > Attachments: patch2.diff, patch.diff > > > The incorrect behavior appears in version 2.3.14.3 and in revision > 1495522. I attached a one-line patch (patch.diff) that fixes it. > Method "ELSupport.containsNulls" checks if the "Object[] obj" array > contains nulls like this: > {code:java|borderStyle=solid} > for (int i = 0; i < obj.length; i++) { > if (obj[0] == null) { > return true; > } > } > return false; > {code} > Instead of "obj[0]", the code should be "obj[i]", as in patch.diff. > If indeed the code is intended to check only "obj[0]", then there is > no need for a loop and the entire method body should be only "return > obj[0] == null;" (I attached patch2.diff, though it's unlikely that > this is the correct behavior). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira