incubator-imperius-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wood <daw...@us.ibm.com>
Subject RE: [jira] Created: (IMPERIUS-25) List.toString() not parsable
Date Wed, 11 Mar 2009 19:02:20 GMT
Well,  the following works in Java. 

        public static void Foo(List l) { l.toString(); }

Should it also work in SPL when using a Java binding? 


David Wood 
Policy Technologies Group
IBM TJ Watson Research Center
dawood@us.ibm.com
914-784-5123 (office), 914-396-6515 (mobile)




From:
"Reza Asadollahi" <rasadoll@uwaterloo.ca>
To:
<imperius-dev@incubator.apache.org>
Date:
03/11/2009 02:58 PM
Subject:
RE: [jira] Created: (IMPERIUS-25) List.toString() not parsable



java.util.List is an interface and does not have toString method.


-----Original Message-----
From: David Wood (JIRA) [mailto:jira@apache.org] 
Sent: March 11, 2009 2:39 PM
To: imperius-dev@incubator.apache.org
Subject: [jira] Created: (IMPERIUS-25) List.toString() not parsable

List.toString() not parsable
----------------------------

                 Key: IMPERIUS-25
                 URL: https://issues.apache.org/jira/browse/IMPERIUS-25
             Project: Imperius
          Issue Type: Bug
            Reporter: David Wood
            Assignee: Bill Stoddard


If I use the following policy:

Import Class java.util.List:list1;
Strategy Execute_All_Applicable;
Policy 
{
                 Condition 
                 { 
                    list1.toString() == "something"
                 }
                 Decision 
                 { 
                                 list1.toString()
                 }
}:1;

I get 

 Symbol does not exist list1.toString
<AST>:0:0: unexpected end of subtree
Did NOT parse!
com.ibm.watson.pml.PMLException: Parsing SPL policy
                 at
com.ibm.watson.pml.spl.policy.SPLPolicyParser.parse(SPLPolicyParser.java:41)
                 at 
com.ibm.watson.pml.util.VerifyPolicy.main(VerifyPolicy.java:80)
Caused by: org.apache.imperius.spl.parser.exceptions.SPLException: left 
hand
side expression passed in is null.
                 at
org.apache.imperius.spl.datastore.impl.PolicyParserImpl.parseFile(PolicyPars
erImpl.java:166)
                 at
org.apache.imperius.spl.datastore.impl.PolicyParserImpl.createInternalPolicy
Object(PolicyParserImpl.java:96)
                 at
com.ibm.watson.pml.spl.policy.SPLJavaParser.parse(SPLJavaParser.java:57)
                 at
com.ibm.watson.pml.spl.policy.SPLPolicyParser.parse(SPLPolicyParser.java:39)
                 ... 1 more


However, if I change the list1 to a type Properties then the problem goes
away.


Import Class java.util.Properties:list1;
Strategy Execute_All_Applicable;
Policy 
{
                 Condition 
                 { 
                    list1.toString() == "something"
                 }
                 Decision 
                 { 
                                 list1.toString()
                 }
}:1;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message