You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2006/12/26 02:04:25 UTC

[jira] Commented: (HARMONY-1232) [classlib][jndi] compatibility: ctor SearchResult(null, ...) throws IllegalArgumentException on Harmony and creates object on RI

    [ http://issues.apache.org/jira/browse/HARMONY-1232?page=comments#action_12460837 ] 
            
Vasily Zakharov commented on HARMONY-1232:
------------------------------------------

See the discussion at http://thread.gmane.org/gmane.comp.java.harmony.devel/21721 about possible resolution of this bug.


> [classlib][jndi] compatibility: ctor SearchResult(null, ...) throws IllegalArgumentException on Harmony and creates object on RI
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1232
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1232
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Vladimir Ivanov
>            Priority: Minor
>         Attachments: Harmony-1232-Test.patch, Harmony-1232.patch, Harmony-1232.patch
>
>
> The constructor javax.naming.directory.SearchResult.SearchResult(String name, String className,  Object obj,  Attributes attrs,  boolean isRelative) throws IllegalArgumentException on Harmony and creates object on RI if name == null or attrs == null.
> The spec says:
> "name - The non-null name of the search item
> attrs - ... Cannot be null." so it is 'non-bug diff'
> ==================== test.java =======================
> import javax.naming.directory.SearchResult;
> import javax.swing.plaf.basic.BasicTableUI;
> public class test {
>     public static void main(String args[]) {
>         System.out.println("res = " + new SearchResult(null, "", new BasicTableUI(), null, false));
>     }
> }
> ==================================================
> 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))
> res = (not relative)null: :javax.swing.plaf.basic.BasicTableUI@1b35ed:null
> C:\tmp\tmp17>C:\harmony\classlib1.5\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.
> Exception in thread "main" java.lang.IllegalArgumentException: name must not be null
>         at javax.naming.NameClassPair.<init>(NameClassPair.java:112)
>         at javax.naming.Binding.<init>(Binding.java:14)
>         at javax.naming.directory.SearchResult.<init>(SearchResult.java:176)
>         at test.main(test.java:6)

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