You are viewing a plain text version of this content. The canonical link for it is here.
Posted to imperius-dev@incubator.apache.org by "David Wood (JIRA)" <ji...@apache.org> on 2009/03/11 18:38:50 UTC
[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(PolicyParserImpl.java:166)
at org.apache.imperius.spl.datastore.impl.PolicyParserImpl.createInternalPolicyObject(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.
RE: [jira] Created: (IMPERIUS-25) List.toString() not parsable
Posted by David Wood <da...@us.ibm.com>.
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" <ra...@uwaterloo.ca>
To:
<im...@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.
RE: [jira] Created: (IMPERIUS-25) List.toString() not parsable
Posted by Reza Asadollahi <ra...@uwaterloo.ca>.
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.