Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 15935 invoked from network); 29 Sep 2008 02:53:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2008 02:53:18 -0000 Received: (qmail 32097 invoked by uid 500); 29 Sep 2008 02:53:16 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 32051 invoked by uid 500); 29 Sep 2008 02:53:16 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 32040 invoked by uid 99); 29 Sep 2008 02:53:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Sep 2008 19:53:15 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of peter.jones@iona.com designates 12.170.54.180 as permitted sender) Received: from [12.170.54.180] (HELO amer-mx1.iona.com) (12.170.54.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 02:52:15 +0000 X-IronPort-AV: E=Sophos;i="4.33,328,1220241600"; d="scan'208";a="15265353" Received: from amer-ems1.ionaglobal.com ([10.65.6.25]) by amer-mx1.iona.com with ESMTP; 28 Sep 2008 22:52:48 -0400 Received: from homer.ooc.nf.ca ([10.68.8.2]) by amer-ems1.IONAGLOBAL.COM with Microsoft SMTPSVC(6.0.3790.1830); Sun, 28 Sep 2008 22:52:47 -0400 Received: (from pejones@localhost) by homer.ooc.nf.ca (8.11.6/8.11.6) id m8T2q1q08230 for dev@cxf.apache.org; Mon, 29 Sep 2008 00:22:01 -0230 X-Authentication-Warning: homer.ooc.nf.ca: pejones set sender to peter.jones@iona.com using -f Date: Mon, 29 Sep 2008 00:22:00 -0230 From: Peter Jones To: dev@cxf.apache.org Subject: aegis JaxbTypeTest Message-ID: <20080929002200.A8164@homer.ooc.nf.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: IONA Technologies X-OriginalArrivalTime: 29 Sep 2008 02:52:47.0740 (UTC) FILETIME=[747A53C0:01C921DE] X-Virus-Checked: Checked by ClamAV on apache.org Hi there, Think there's a small discrepancy in the rt/databinding/aegis JaxbTypeTest. Note the type which is checked for when the element QName is "elementProperty" in the two checks below: AnnotatedTypeInfo info = new AnnotatedTypeInfo(tm, JaxbBean1.class, "urn:foo", new TypeCreationOptions()); ... QName element = (QName)elements.next(); ... Type custom = info.getType(element); if ("bogusProperty".equals(element.getLocalPart())) { assertTrue(custom instanceof StringType); } else if ("elementProperty".equals(element.getLocalPart())) { assertTrue(custom instanceof CustomStringType); } else { fail("Unexpected element name: " + element.getLocalPart()); } element = (QName)elements.next(); ... custom = info.getType(element); if ("bogusProperty".equals(element.getLocalPart())) { assertTrue(custom instanceof StringType); } else if ("elementProperty".equals(element.getLocalPart())) { assertTrue(custom instanceof StringType); } else { fail("Unexpected element name: " + element.getLocalPart()); } If the "elementProperty" is the first QName, we check that the type is an instance of CustomStringType, but if its the second Qname we check that its an instance of StringType. This is the annotation in the JaxbBean1 class: @XmlElement(type = CustomStringType.class) public String getElementProperty() { Would that suggest the type should be a CustomStringType? In the test, it's always a StringType. The test passes with the sun jdk as "elementProperty" is always the second QName returned, but if you run this test with the ibm jdk, it fails since "elementProperty" is the first QName returned. If the test is wrong and it should check for StringType both times, fair enough, otherwise, I can file a jira. Let me know if you have any thoughts. Cheers, Peter -- Peter Jones Progress Software E-Mail: mailto:peter.jones@iona.com Tel: 709-738-3725 x321 | Fax: 709-738-3745 570 Newfoundland Drive, St. John's, NL, Canada A1A 5B1