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

[jira] Created: (HARMONY-985) [classlib][luni] bug-to-bug compatibility java.util.Formatter.Formatter(Appendable a)

[classlib][luni] bug-to-bug compatibility java.util.Formatter.Formatter(Appendable a)
-------------------------------------------------------------------------------------

                 Key: HARMONY-985
                 URL: http://issues.apache.org/jira/browse/HARMONY-985
             Project: Harmony
          Issue Type: Bug
          Components: Non-bug differences from RI
            Reporter: Richard Liang


For the constructor java.util.Formatter.Formatter(Appendable a):

If we pass a null to j.u.Formatter.Formatter(Appendable a), when we try to get the destination of the formatter's output by calling formatter.out(), RI will thrown a java.util.FormatterClosedException. But according to the specification,  the destination should be a StringBuilder. 

Harmony complies with  the specification, but RI breaks the specification.

References:
1) Specification:
public Formatter(Appendable a)
   Constructs a new formatter with the specified destination.
   The locale used is the default locale for this instance of the Java virtual machine.
   Parameters:
       a - Destination for the formatted output. If a is null then a StringBuilder will be created.
2) The following test passes on Harmony, but fails on RI.
   public void test_ConstructorLjava_lang_Appendable() {
       Formatter formatter = new Formatter((Appendable) null);
       Appendable out = formatter.out();
       assertTrue(out instanceof StringBuilder);
   } 
3) Discussion in harmony-dev: http://www.mail-archive.com/harmony-dev@incubator.apache.org/msg09376.html

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

        

[jira] Commented: (HARMONY-985) [classlib][luni] bug-to-bug compatibility java.util.Formatter.Formatter(Appendable a)

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-985?page=comments#action_12434611 ] 
            
Tony Wu commented on HARMONY-985:
---------------------------------

would be closed according discussion on
http://www.mail-archive.com/harmony-dev@incubator.apache.org/msg10916.html

> [classlib][luni] bug-to-bug compatibility java.util.Formatter.Formatter(Appendable a)
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-985
>                 URL: http://issues.apache.org/jira/browse/HARMONY-985
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Richard Liang
>
> For the constructor java.util.Formatter.Formatter(Appendable a):
> If we pass a null to j.u.Formatter.Formatter(Appendable a), when we try to get the destination of the formatter's output by calling formatter.out(), RI will thrown a java.util.FormatterClosedException. But according to the specification,  the destination should be a StringBuilder. 
> Harmony complies with  the specification, but RI breaks the specification.
> References:
> 1) Specification:
> public Formatter(Appendable a)
>    Constructs a new formatter with the specified destination.
>    The locale used is the default locale for this instance of the Java virtual machine.
>    Parameters:
>        a - Destination for the formatted output. If a is null then a StringBuilder will be created.
> 2) The following test passes on Harmony, but fails on RI.
>    public void test_ConstructorLjava_lang_Appendable() {
>        Formatter formatter = new Formatter((Appendable) null);
>        Appendable out = formatter.out();
>        assertTrue(out instanceof StringBuilder);
>    } 
> 3) Discussion in harmony-dev: http://www.mail-archive.com/harmony-dev@incubator.apache.org/msg09376.html

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

        

[jira] Closed: (HARMONY-985) [classlib][luni] bug-to-bug compatibility java.util.Formatter.Formatter(Appendable a)

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-985?page=all ]

Paulex Yang closed HARMONY-985.
-------------------------------

    Resolution: Fixed

Verfied in dev-list as Non-bug difference.

> [classlib][luni] bug-to-bug compatibility java.util.Formatter.Formatter(Appendable a)
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-985
>                 URL: http://issues.apache.org/jira/browse/HARMONY-985
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Richard Liang
>
> For the constructor java.util.Formatter.Formatter(Appendable a):
> If we pass a null to j.u.Formatter.Formatter(Appendable a), when we try to get the destination of the formatter's output by calling formatter.out(), RI will thrown a java.util.FormatterClosedException. But according to the specification,  the destination should be a StringBuilder. 
> Harmony complies with  the specification, but RI breaks the specification.
> References:
> 1) Specification:
> public Formatter(Appendable a)
>    Constructs a new formatter with the specified destination.
>    The locale used is the default locale for this instance of the Java virtual machine.
>    Parameters:
>        a - Destination for the formatted output. If a is null then a StringBuilder will be created.
> 2) The following test passes on Harmony, but fails on RI.
>    public void test_ConstructorLjava_lang_Appendable() {
>        Formatter formatter = new Formatter((Appendable) null);
>        Appendable out = formatter.out();
>        assertTrue(out instanceof StringBuilder);
>    } 
> 3) Discussion in harmony-dev: http://www.mail-archive.com/harmony-dev@incubator.apache.org/msg09376.html

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