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 daw...@us.ibm.com 914-784-5123 (office), 914-396-6515 (mobile) From: Xiping Wang/Watson/i...@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)" <j...@apache.org> "David Wood (JIRA)" <j...@apache.org> 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.