Issue Details (XML | Word | Printable)

Key: JANINO-97
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Arno Unkrig
Reporter: Arno Unkrig
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Janino

ExpressionEvaluator.createFastExpressionEvaluator calls setReturnType

Created: 22/Jul/07 03:52 PM   Updated: 22/Jul/07 03:53 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
Originally posted by Wilfred van der Deijl 2007-07-21

Hi,

I'm new to Janino and am trying to use ExpressionEvaluator.createFastExpressionEvaluator(String expression, Class interfaceToImplement, String[] parameterNames, ClassLoader optionalParentClassLoader) in version 2.5.8

I run into the following runtime error:
Exception in thread "main" java.lang.RuntimeException: Don't call "setReturnType(Class)" on an ExpressionEvaluator, use "setExpressionType(Class)" instead
at org.codehaus.janino.ExpressionEvaluator.setReturnType(ExpressionEvaluator.java)
at org.codehaus.janino.ScriptEvaluator.createFastEvaluator(ScriptEvaluator.java)
at org.codehaus.janino.ScriptEvaluator.createFastEvaluator(ScriptEvaluator.java)
at org.codehaus.janino.ExpressionEvaluator.createFastExpressionEvaluator(ExpressionEvaluator.java)
at com.commit.consulting.janino.Client.main(Client.java:55)
As it turns out, ScriptEvaluator.createFastEvaluator calls setReturnType, which is not allowed on a ExpressionEvaluator.

Is it me doing something wrong or is this a bug in Janino?
If it's a bug, I'm happy to submit a bug report in Jira, but I didn't want to clutter Jira with something that might be my own error.

Regards,
Wilfred



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arno Unkrig added a comment - 22/Jul/07 03:53 PM
Hi Wilfred,

it's definitely a bug (since JANINO 2.4.5). I will fix it and release version 2.5.9 tonight.

CU

Arno