[Nice-commit] Nice/src/gnu/bytecode Access.java,1.6,1.7
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-09-20 10:24:52
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25363/src/gnu/bytecode Modified Files: Access.java Log Message: Do not create custom constructors based on unaccessible parent constructors. Correct access checking for default (non-protected) visibility. Index: Access.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/Access.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Access.java 19 Feb 2004 11:30:02 -0000 1.6 --- Access.java 20 Sep 2004 10:24:41 -0000 1.7 *************** *** 49,52 **** --- 49,54 ---- @return true if code in class c can access method m, with the first argument of the call being receiver. + + receiver is null if the call is static. */ public static boolean legal(ClassType c, Method m, Type receiver) *************** *** 63,67 **** // clone is the only method overriden for arrays, where it is public. // (JLS-2 10.7) ! if (m.getName().equals("clone") && receiver.isArray()) return true; --- 65,69 ---- // clone is the only method overriden for arrays, where it is public. // (JLS-2 10.7) ! if (receiver != null && receiver.isArray() && m.getName().equals("clone")) return true; *************** *** 71,78 **** // PROTECTED ! /* TODO: For now, we consider all default access as also protected. Being ! more precise needs an implementation of the visibility system in Nice. ! */ ! return //(mod & PROTECTED) != 0 && c.isSubclass(target) && receiver.isSubtype(c); } --- 73,77 ---- // PROTECTED ! return (mod & PROTECTED) != 0 && c.isSubclass(target) && receiver.isSubtype(c); } |