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-1094) [classlib][auth] compatibility: Sasl.createSaslClient(..) returns 'null' on Harmony and throws exceptions on RI
Date Mon, 04 Sep 2006 07:46:25 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1094?page=all ]

Stepan Mishura reassigned HARMONY-1094:
---------------------------------------

    Assignee: Stepan Mishura

> [classlib][auth] compatibility: Sasl.createSaslClient(..) returns 'null' on Harmony and
throws exceptions on RI
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1094
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1094
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vladimir Ivanov
>         Assigned To: Stepan Mishura
>            Priority: Minor
>
> The method Sasl.createSaslClient(..) returns 'null' on Harmony and throws NullPointerException
or SaslException on RI.
> ====================== test.java ==========================
> import javax.security.auth.callback.Callback;
> import javax.security.sasl.Sasl;
> import javax.security.sasl.SaslException;
> import javax.security.auth.callback.CallbackHandler;
> public class test  {
>     public static void main (String[] args) {
>         try {
>             System.out.println("res = " + Sasl.createSaslClient(new String[] {null},
null, null, Sasl.POLICY_NODICTIONARY, null, new testCallbackHandler()));
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>         try {
>             System.out.println("res = " + Sasl.createSaslClient(new String[] {"CRAM-MD5"},
null, null, Sasl.POLICY_NODICTIONARY, null, new testCallbackHandler()));
>         } catch (Exception e) {
>              e.printStackTrace();
>         }
>     }
> }
> class testCallbackHandler implements CallbackHandler {
>     public void handle(Callback[] p0) {
>         return;
>     }
> }
> =======================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System
optimized over throughput (initial strategy singleparpar))
> java.lang.NullPointerException: Mechanism name cannot be null
>         at javax.security.sasl.Sasl.createSaslClient(Sasl.java:325)
>         at test.main(test.java:10)
> javax.security.sasl.SaslException: CRAM-MD5: authentication ID and password must be specified
>         at com.sun.security.sasl.CramMD5Client.<init>(CramMD5Client.java:42)
>         at com.sun.security.sasl.ClientFactoryImpl.createSaslClient(ClientFactoryImpl.java:70)
>         at javax.security.sasl.Sasl.createSaslClient(Sasl.java:341)
>         at test.main(test.java:15)
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -cp . -showversion
test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> res = null
> res = null

-- 
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