This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] PR java/9685: Fix Catching Illegal Access to Package-PrivateFields/Members


Ranjit Mathew wrote:

This patch proposes to fix PR java/9685.

Tested on i686-pc-linux-gnu by bootstrapping c,c++,java.
No testsuite regressions, except for the known
InvokeInterface failure that's unrelated to this patch.

Ok for mainline?


Ranjit,

This patch looks good to me (see comments below), but Andrew or Per will have to approve it. Did you run it against the jacks testsuite? Hopefully it should fix some failures there.

Notes:

1. This still does not fix catching illegal accesses to
package-private *classes* - only fields/members. That
needs a separate patch.



Could you file a separate PR for this case (if one doesn't exist already)?


2. I chose to create a new function java_acc_ctrl_str
instead of using java_accstring_lookup, as the latter
does not return the desired string for package-private
access. It also returns "bogus" strings if static, etc.
is also flagged.


It would be good to add a comment explaining this to java_acc_ctrl_str. Also it might be nice to have a less cryptic method name here - the front end is not afraid of long function names ;-) perhaps member_accessibility_string ?

Regards

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]