From imperius-dev-return-403-apmail-incubator-imperius-dev-archive=incubator.apache.org@incubator.apache.org Thu May 28 16:35:41 2009 Return-Path: Delivered-To: apmail-incubator-imperius-dev-archive@minotaur.apache.org Received: (qmail 3694 invoked from network); 28 May 2009 16:35:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 May 2009 16:35:41 -0000 Received: (qmail 81160 invoked by uid 500); 28 May 2009 16:24:21 -0000 Delivered-To: apmail-incubator-imperius-dev-archive@incubator.apache.org Received: (qmail 81153 invoked by uid 500); 28 May 2009 16:24:21 -0000 Mailing-List: contact imperius-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: imperius-dev@incubator.apache.org Delivered-To: mailing list imperius-dev@incubator.apache.org Received: (qmail 81132 invoked by uid 99); 28 May 2009 16:24:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 16:24:19 +0000 X-ASF-Spam-Status: No, hits=-1.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dawood@us.ibm.com designates 32.97.182.141 as permitted sender) Received: from [32.97.182.141] (HELO e1.ny.us.ibm.com) (32.97.182.141) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 16:24:09 +0000 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4SGJgFV009400 for ; Thu, 28 May 2009 12:19:42 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4SGNliY148542 for ; Thu, 28 May 2009 12:23:47 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4SGLf6B030423 for ; Thu, 28 May 2009 12:21:41 -0400 Received: from d01ml605.pok.ibm.com (d01ml605.pok.ibm.com [9.56.227.91]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n4SGLeRu030389 for ; Thu, 28 May 2009 12:21:41 -0400 In-Reply-To: References: <66445616.1243384185634.JavaMail.jira@brutus> To: imperius-dev@incubator.apache.org Cc: imperius-dev@incubator.apache.org MIME-Version: 1.0 Subject: Re: [jira] Updated: (IMPERIUS-28) byte[] method return type does not match formal parameter X-KeepSent: 91E7FFB3:84C8D204-852575C4:0059C098; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.0.1 HF105 April 10, 2008 From: David Wood Message-ID: Date: Thu, 28 May 2009 12:23:46 -0400 X-MIMETrack: Serialize by Router on D01ML605/01/M/IBM(Release 8.5|December 05, 2008) at 05/28/2009 12:23:46, Serialize complete at 05/28/2009 12:23:46 Content-Type: multipart/alternative; boundary="=_alternative 0059EC83852575C4_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 0059EC83852575C4_= Content-Type: text/plain; charset="US-ASCII" I don't think this is an SPL specification issue. This is strictly a problem with the definition of the method's return type as indicated in the Java Class object. Somehow that definition is not being picked up as an array and instead just as a single byte. It _is_ getting the formal parameter definition correct (i.e. a byte[]). David Wood Policy Technologies Group IBM TJ Watson Research Center dawood@us.ibm.com 914-784-5123 (office), 914-396-6515 (mobile) From: Xiping Wang/Watson/IBM@IBMUS To: imperius-dev@incubator.apache.org Cc: imperius-dev@incubator.apache.org Date: 05/28/2009 11:51 AM Subject: Re: [jira] Updated: (IMPERIUS-28) byte[] method return type does not match formal parameter David, It seems to me that Imperius is not capable of handling array return type because the SPL does not distinguish between primitive return type and array return type syntactically. Xiping IBM T.J. Watson Research Center "David Wood (JIRA)" "David Wood (JIRA)" 05/26/2009 08:29 PM Please respond to imperius-dev@incubator.apache.org To imperius-dev@incubator.apache.org cc Subject [jira] Updated: (IMPERIUS-28) byte[] method return type does not match formal parameter [ https://issues.apache.org/jira/browse/IMPERIUS-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Wood updated IMPERIUS-28: ------------------------------- Attachment: ByteArrayFactory.java PolicyParser.java > byte[] method return type does not match formal parameter > --------------------------------------------------------- > > Key: IMPERIUS-28 > URL: https://issues.apache.org/jira/browse/IMPERIUS-28 > Project: Imperius > Issue Type: Bug > Environment: Windows, Java 1.5 > Reporter: David Wood > Assignee: Bill Stoddard > Attachments: ByteArrayFactory.java, PolicyParser.java > > Original Estimate: 96h > Remaining Estimate: 96h > > It appears that a method's byte[] return type is not being properly matched with a byte[] method argument. The attached Java program includes a policy that passes the byte[] return value of a method to another method that expects the same. This gives the following message: > May 26, 2009 8:20:52 PM org.apache.imperius.spl.parser.compiler.SPLTreeParser identPrimary > SEVERE: main TreeParser::Exception creating Expression at line 4 : Formal and passed parameter types don't match for method takeByteArray > Formal and passed parameter types don't match for method takeByteArray > May 26, 2009 8:20:52 PM org.apache.imperius.spl.datastore.impl.PolicyParserImpl parseFile > SEVERE: Error encountered while parsing tree > Exception in thread "main" org.apache.imperius.spl.parser.exceptions.SPLException: Error encountered while parsing tree > at org.apache.imperius.spl.datastore.impl.PolicyParserImpl.parseFile(PolicyParserImpl.java:166) > at org.apache.imperius.spl.datastore.impl.PolicyParserImpl.createInternalPolicyObject(PolicyParserImpl.java:96) > at com.ibm.watson.pml.bytearray.PolicyParser.main(PolicyParser.java:55) > I've attached both the Java program and the ByteArrayFactory interface that is used in the policy (also found in the Java file). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --=_alternative 0059EC83852575C4_=--