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

Max Ockner commented on NUTCH-2902:
-----------------------------------

Hello, I have implemented a fix for this ([^jexl.patch]).

This patch intends to restore previous functionality by enabling JexlScript 
instead of JexlExpression.

It seems like the main argument for using JexlExpression is the decreased 
possibility of writing an unsafe (e.g. poorly performing or incorrect) script. 
My opinion is that this gets in the way more than it helps, so this patch 
changes to using JexlScript everywhere JexlExpression is currently used. 

I also noticed that there is a JexlUtils helper that is used sometimes but not 
all of the time. I considered unifying this but wasn't sure if it belonged in a 
separate update.

> Jexl parsing error on statements
> --------------------------------
>
>                 Key: NUTCH-2902
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2902
>             Project: Nutch
>          Issue Type: Bug
>          Components: generator
>    Affects Versions: 1.18
>            Reporter: Sebastian Nagel
>            Priority: Major
>             Fix For: 1.19
>
>         Attachments: jexl.patch
>
>
> (reported by [~maxockner] on the [user mailing 
> list|https://lists.apache.org/thread/py6gf7njr3xyx0wm1wnv58vgp7fx0j30])
> [Jexl 
> 3.0|https://commons.apache.org/proper/commons-jexl/changes-report.html#a3.0] 
> enforced that a JexlExpression does not contains statements. However, 
> NUTCH-2368 intended that a JexlScript is allowed. Need to switch from 
> JexlExpression to JexlScript in Generator.
> But should also verify whether to fix other components where Jexl is used:
> - JexlExchange
> - JexlIndexingFilter
> - CrawlDbReader



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to