harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6593) [classlib][luni]SecurityManager.checkExit(status) function fails to check for various status values
Date Tue, 20 Jul 2010 08:41:49 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890216#action_12890216
] 

Tim Ellison commented on HARMONY-6593:
--------------------------------------

This causes another test to fail:

This should throw a SecurityException.

junit.framework.AssertionFailedError: This should throw a SecurityException.
at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_checkExit_int(SecurityManagerTest.java:288)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:197)


I'll take a look too.


> [classlib][luni]SecurityManager.checkExit(status) function fails to check for various
status values
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6593
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6593
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M13
>         Environment: Windows and Linux
>            Reporter: Mohanraj Loganathan
>            Assignee: Tim Ellison
>         Attachments: securityManager_exitV_001.diff
>
>
> Consider the testcase below[1]. Harmony throws unknown permission 
> But with RI the same test passes. 
> As per API doc, checkExit should be able to check VM exit status. 
> [1] testcase: 
>     public void test_checkExit_int1() {
>         SecurityManager mySecMngr = new SecurityManager(){
>             public void checkPermission(Permission permission) {
>                 if (!permission.equals(new RuntimePermission("exitVM.1") )) {
>                     throw new SecurityException("unknown permission");
>                 }
>             }
>         };
>         mySecMngr.checkExit(1);
>         try {
>             mySecMngr.checkExit(2);
>             fail("Should throw SecurityException");
>         } catch (SecurityException se) {
>             // expected
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message