From: Timothy W. <tw...@us...> - 2005-10-09 03:11:26
|
Update of /cvsroot/abbot/abbot/src/abbot/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29840/src/abbot/script Modified Files: AppletSecurityManager.java Appletviewer.java Log Message: clean up unit tests Index: Appletviewer.java =================================================================== RCS file: /cvsroot/abbot/abbot/src/abbot/script/Appletviewer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Appletviewer.java 14 Mar 2005 03:59:53 -0000 1.9 --- Appletviewer.java 9 Oct 2005 03:11:13 -0000 1.10 *************** *** 312,315 **** --- 312,316 ---- oldSM = System.getSecurityManager(); if (oldSM == null || (oldSM instanceof NoExitSecurityManager)) { + Log.debug("install security manager"); // NOTE: the security manager *must* be loaded with the same class // loader as the appletviewer. *************** *** 328,331 **** --- 329,335 ---- } } + else { + Log.debug("old sm=" + oldSM); + } } *************** *** 356,359 **** --- 360,364 ---- super.terminate(); if (oldSM != null) { + Log.debug("restore sm=" + oldSM); System.setSecurityManager(oldSM); } Index: AppletSecurityManager.java =================================================================== RCS file: /cvsroot/abbot/abbot/src/abbot/script/AppletSecurityManager.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AppletSecurityManager.java 3 Dec 2003 07:07:33 -0000 1.4 --- AppletSecurityManager.java 9 Oct 2005 03:11:13 -0000 1.5 *************** *** 1,4 **** --- 1,5 ---- package abbot.script; + import abbot.ExitException; /** This security manager extends sun.applet.AppletSecurity b/c *************** *** 21,35 **** public void checkPermission(java.security.Permission perm, Object context) { ! if (parent != null) parent.checkPermission(perm, context); } public void checkPermission(java.security.Permission perm) { ! if (parent != null) parent.checkPermission(perm); } public void checkExit(int status) { ! if (parent != null) ! parent.checkExit(status); } } --- 22,37 ---- public void checkPermission(java.security.Permission perm, Object context) { ! if (parent != null) { parent.checkPermission(perm, context); + } } public void checkPermission(java.security.Permission perm) { ! if (parent != null) { parent.checkPermission(perm); + } } public void checkExit(int status) { ! throw new ExitException("Applet System.exit disallowed", status); } } |