[ http://issues.apache.org/jira/browse/OFBIZ-528?page=comments#action_12456340 ] Cameron Smith commented on OFBIZ-528: -------------------------------------
The attached files are for validation and testing by the community. They were compiled against 1.5. If I don't hear anything to the contrary in the next few days, I will get the upcoming weekly build on friday, and recompile and test everything with both JDK1.4 and JDK1.5 before submitting final versions of everything. I would like people's opinions on the following points especially... a. I suggested a clearer name for the new jar, in keeping with the current effort to include versions in jar names, which I wholeheartedly support b. BshClassManager.createClassManager() is now just a convenience method, because of changes within Beanshell since 1.3.x. I believe we should in fact ditch this method for two reasons... i. It is one less difference between our source and orig. Beanshell source ii. Within OFBiz source (BshUtil.getMasterInterpreter), it is clearer what we are doing if we explicitly call createClassManager(null) c. There appears to be somewhat different handling of nulls in this version of Beanshell. I have not investigated fully yet, but I had to tweak at least one script for compatibility. There may be others. For example look at attached viewprofile.bsh, line 89. In "pure java", I should definitely not have had to concatenate an empty String before passing in the argument to Boolean.valueOf(). Anyway, the attached code has been submitted to the following tests: 1. ofbiz_opentaps_473442 builds cleanly against this jar 2. All OFBiz screens THAT I HAD NOTICED which previously were breaking with bsh, are now working. In one case, (see notes above) I had to slightly tweak the file. 3. ZK 2.1.2, which did not work with original bsh.jar, works perfectly 4. The beanshell 2.0b4 "test suite", runs with exactly the same passes and fails that it shows when run against the original 2.0b4. > Upgrade Beanshell library to version 2.0b4 > ------------------------------------------ > > Key: OFBIZ-528 > URL: http://issues.apache.org/jira/browse/OFBIZ-528 > Project: OFBiz (The Open for Business Project) > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442 > Reporter: Cameron Smith > Attachments: bsh-2.0b4-mod-ofbiz.jar, BshClassManager.java, > Interpreter.java, viewprofile.bsh > > > As discussed recently on ofbiz-users mailing list, I proposed to upgrade the > Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is > based on a 1.3a1, to the current "stable" version, 2.0b4. > This has the following advantages: > - JDK1.5 interpretation capability > - various bugfixes > However as explained by David E. Jones here: > http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29 > ...it will be necessary to patch the source to allow for the script parsing > on which OFBiz depends. > This fix MAY also resolve this bug: > https://issues.apache.org/jira/browse/OFBIZ-303 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
