[ 
https://issues.apache.org/jira/browse/JEXL-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060178#comment-16060178
 ] 

Bruno P. Kinoshita commented on JEXL-227:
-----------------------------------------

Looking at Java 8 Nashorn;

{code:java}
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public class Scripts {

    public static void main(String[] args) {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");
        System.out.println("ENGINE: " + engine.getFactory().getEngineVersion());
        System.out.println("LANGUAGE: " + 
engine.getFactory().getLanguageVersion());
    }
}
{code}

Gives:

{noformat}
ENGINE: 1.8.0_131
LANGUAGE: ECMA - 262 Edition 5.1
{noformat}

So I believe in our case, the ENGINE_VERSION must match the version of JEXL. 
And Language should either match that version, or be 3.0 until there are 
changes that impact the language (in that case, we need to remember to update 
it should we add/remove features from the language).

>As a reminder, we may want to create a bug that we re-create after each 
>release stating 'verify getLanguageVersion/getEngineVersion before release'. 
>Otherwise, we'll probably keep forgetting about it...

Big +1 for that. Are you going to do that? Otherwise I can create the ticket, 
and assign to the next version, linking to this discussion, and asking the 
assignee to create a new one for the next release.

> JexlScriptEngineFactory.getEngineVersion() should return actual version, ie 
> 3.1 as of reporting
> -----------------------------------------------------------------------------------------------
>
>                 Key: JEXL-227
>                 URL: https://issues.apache.org/jira/browse/JEXL-227
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Priority: Minor
>
> JexlScriptEngineFactory.getEngineVersion() reports "3.0" as a script engine 
> version in 3.1
> {code}
>     public String getEngineVersion() {
>         return "3.0"; // ensure this is updated if function changes are made 
> to this class
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to