Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 35036 invoked from network); 2 Oct 2008 09:08:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Oct 2008 09:08:08 -0000 Received: (qmail 57974 invoked by uid 500); 2 Oct 2008 09:08:04 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 57896 invoked by uid 500); 2 Oct 2008 09:08:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 57852 invoked by uid 99); 2 Oct 2008 09:08:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2008 02:08:03 -0700 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; Thu, 02 Oct 2008 09:07:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 42BF5234C211 for ; Thu, 2 Oct 2008 02:07:44 -0700 (PDT) Message-ID: <1180730410.1222938464272.JavaMail.jira@brutus> Date: Thu, 2 Oct 2008 02:07:44 -0700 (PDT) From: "Alexey Kuznetsov (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (JEXL-48) NPE during expression evaluation In-Reply-To: <642670535.1222938344970.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JEXL-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Kuznetsov updated JEXL-48: --------------------------------- Description: When we use '=' instead of '==' we'll get NullPointerException Please pay attention to attachement was: When we use '=' instead of '==' we'll get NullPointerException public class Main { public static class Another { private Boolean foo = true; public Boolean foo() { return foo; } public int goo() { return 100; } } public static class Foo { private Another inner; public Foo() { inner = new Another(); } public Another getInner() { return inner; } } /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { String jexlExp = "(foo.getInner().foo() eq true) and (foo.getInner().goo() = (foo.getInner().goo()+1-1))"; Expression e = ExpressionFactory.createExpression( jexlExp ); // Create a context and add data JexlContext jc = JexlHelper.createContext(); jc.getVars().put("foo", new Foo() ); // Now evaluate the expression, getting the result Object o = e.evaluate(jc); System.out.println("Result: "+o); } } > NPE during expression evaluation > -------------------------------- > > Key: JEXL-48 > URL: https://issues.apache.org/jira/browse/JEXL-48 > Project: Commons JEXL > Issue Type: Bug > Affects Versions: 1.1 > Environment: Java 1.6.0 update 07 > Reporter: Alexey Kuznetsov > Attachments: Main.java > > > When we use '=' instead of '==' we'll get NullPointerException > Please pay attention to attachement -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.