harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-1715) javax.security.auth.login.Configuration.getConfiguration() does not throw SecurityException
Date Mon, 09 Oct 2006 07:38:22 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1715?page=all ]

Stepan Mishura reassigned HARMONY-1715:
---------------------------------------

    Assignee: Stepan Mishura

> javax.security.auth.login.Configuration.getConfiguration() does not throw SecurityException
> -------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1715
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1715
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vera Aristova
>         Assigned To: Stepan Mishura
>            Priority: Minor
>         Attachments: patch1715, patch1715, patch1715
>
>
> javax.security.auth.login.Configuration.getConfiguration() does not throw specified SecurityException
while RI does throw it.
> Test for reproducing:
> import junit.framework.TestCase;
> import javax.security.auth.login.Configuration;
> public class test extends TestCase 
> {
>       public void testGetConfiguration() 
>       {
>             try 
>             {
>                   Configuration.getConfiguration();
>                   System.out.println("Configuration="+Configuration.getConfiguration());
>                   fail("SecurityException should be thrown!");
>             } 
>             catch (SecurityException e) 
>             { e.printStackTrace();
>               assertEquals(true,true);
>             }
>       }
> }
> OUTPUT:
> HARMONY
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r452710, (Oct  4 2006), Linux/ia32/gcc 3.3.4, debug build
> http://incubator.apache.org/harmony
> Time: 0.015
> There was 1 failure:
> 1) testGetConfiguration(test)junit.framework.AssertionFailedError: SecurityException
should
>  be thrown!
>         at test.testGetConfiguration(test.java:11)
>         at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0
> SUN
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> .java.lang.SecurityException: Unable to locate a login configuration
>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at javax.security.auth.login.Configuration$3.run(Configuration.java:216)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:210)
>         at test.testGetConfiguration(test.java:9)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at junit.framework.TestSuite.runTest(TestSuite.java:208)
>         at junit.framework.TestSuite.run(TestSuite.java:203)
>         at junit.textui.TestRunner.doRun(TestRunner.java:116)
>         at junit.textui.TestRunner.start(TestRunner.java:172)
>         at junit.textui.TestRunner.main(TestRunner.java:138)
> Caused by: java.io.IOException: Unable to locate a login configuration
>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
>         ... 25 more
> Time: 0.328
> OK (1 test)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message