Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 23982 invoked from network); 18 Sep 2006 02:39:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 02:39:23 -0000 Received: (qmail 63954 invoked by uid 500); 18 Sep 2006 02:39:23 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 63927 invoked by uid 500); 18 Sep 2006 02:39:23 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 63916 invoked by uid 99); 18 Sep 2006 02:39:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Sep 2006 19:39:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Sep 2006 19:39:20 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5CB027142FE for ; Mon, 18 Sep 2006 02:35:23 +0000 (GMT) Message-ID: <10250351.1158546923377.JavaMail.jira@brutus> Date: Sun, 17 Sep 2006 19:35:23 -0700 (PDT) From: "Paulex Yang (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Closed: (HARMONY-985) [classlib][luni] bug-to-bug compatibility java.util.Formatter.Formatter(Appendable a) In-Reply-To: <14387268.1153910473966.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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