gecko-dev/js
nboyd%atg.com 115380ea02 Original problem in following mail. I implemented JDK1.1 compatibility and performance
improvements:

Subject:
        Rhino: Problem in NativeJavaMethod
   Date:
        Tue, 14 Aug 2001 10:23:35 +0200
   From:
        felix.meschberger@day.com
     To:
        Norris Boyd <nboyd@atg.com>




Hi Norris,

While working with wrapped Java classes we discovered a problem in
NativeJavaMethod : If the public method to be called is part of a
non-public class, the Sun Java VM throws an IllegalAccessException. This
bug in the Sun VM has been reported as Bug 4071593 to Sun, but has not been
resolved since....

I implemented a circumvention, for which I provide you the patch. I quickly
tested it, and it seems to work.

Regards
Felix

And here's the patch :

diff -w -r1.19 NativeJavaMethod.java
227a228,234
>        /**
>         * Due to a bug in Suns VM, public methods in private
>         * classes are not accessible by default (Sun Bug #4071593).
>         * We have to explicitly set the method accessible beforehand
>         */
>        meth.setAccessible(true);
>

-----------------------------------------------------------------
This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying to
this message, and then delete it from your system. Thank you.
The sender does not assume any liability for timely, trouble-free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.

mailto:felix.meschberger@day.com
http://www.day.com

Felix Meschberger
Development
Day Interactive AG
Steinenberg 21-23
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97
2001-08-24 20:01:49 +00:00
..
benchmarks
js2 Added fdlibm_ns to build, stopped warnings from formmatter.h 2001-07-18 22:34:09 +00:00
jsd Use NS_PTR_TO_INT32 macros to do 64-bit safe pointer conversions. 2001-08-14 07:59:59 +00:00
jsdj updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 02:47:15 +00:00
jsj
macbuild Project cleanup, rs=scc. Fix one or more of access paths, linking with the correct startup library, and unnecessary linkage. 2001-08-17 01:28:47 +00:00
ref
rhino Original problem in following mail. I implemented JDK1.1 compatibility and performance 2001-08-24 20:01:49 +00:00
src Check keyword version when scanning, not by installing different keywords on version selection (when starting to compile; bug 96562, r=rogerl, sr=shaver&jband, a=dbaron). 2001-08-24 03:32:31 +00:00
tests Removing skip for ecma_3/String/regress-83293.js. The testcase was incorrect, and is now corrected. 2001-08-14 18:28:57 +00:00
.cvsignore
landbranch.pl
Makefile.in bug 76050, build js/jsd from toplevel makefile so we're sure we've got an xpidl compiler. r=cls 2001-05-15 20:38:26 +00:00
makefile.win updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:40:37 +00:00