[#11641] - Upgrade Rhino Javascript implementation to a current version to enable ES6

Category:
Enhancement request
Priority:
Normal
Status:
Resolved
Project: Severity:
Minor
Resolution:
Fixed
Component: Reproducibility:
N/A
Assigned to:
0

Presently, the version of Rhino included by https://github.com/TIBCOSoftware/jasperreports/blob/f90ac23f9ba375ef9d7a... is 1.7.6 which dates from April 2015 (https://github.com/mozilla/rhino/blob/master/RELEASE-NOTES.md#rhino-176). The most recent version as of this writing is 1.7.10 from April 2018 and this includes feature flags that allow for ES6 support.

This is an enhancement request to have the version of Rhino updated, and ES6 support turned on.

JasperReports
srhaque's picture
13
Joined: Mar 16 2018 - 1:29pm
Last seen: 3 months 2 days ago

6 Comments:

#1

Any chance of an upgrade and turning on ES6? I see that Rhino is at 1.7.11, and it looks like 1.7.12 might be out soon.

I'm no expert obviously, but it looks to me a matter of a single call to "setLanguageVersion(int version)" when setting up the Context near https://github.com/TIBCOSoftware/jasperreports/blob/a4deda878e411c0856eb... might enable ES6 support.

#2
  • Status:New» Assigned
  • Assigned:nobody» teodord
#3

FWIW, I checked, and 1.7.11 is still the latest.

#4

Hi,

Initial tests seem to indicate that setLanguageVersion(int version) does not seem to have any visible effect. Simply upgrading Rhino in the classpath make ES6 constructs work, without any special setting.
Can you confirm? Or do you have a report expression that would not work just by upgrading to Rhino 1.7.11 in the classpath?

Thank you,
Teodor

#5

I replied over on github.

#6
  • Resolution:Open» Fixed
  • Status:Assigned» Resolved

Seems like ES6 expressions work in reports just by upgrading Rhino to 1.7.11, so we are not going to add the setLanguageVersion(int version) method for now. Unless someone proves it is really needed.
Upgraded to Rhino 1.7.11 in master branch.

Thanks,
Teodor

Feedback
randomness