Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 337F03C9A for ; Sat, 30 Apr 2011 19:08:04 +0000 (UTC) Received: (qmail 69517 invoked by uid 500); 30 Apr 2011 19:08:03 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 69443 invoked by uid 500); 30 Apr 2011 19:08:03 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 69434 invoked by uid 99); 30 Apr 2011 19:08:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2011 19:08:03 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.17.8] (HELO moutng.kundenserver.de) (212.227.17.8) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2011 19:07:57 +0000 Received: from [192.168.178.20] (trir-5d800225.pool.mediaWays.net [93.128.2.37]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0Lurx3-1PqE8V1QQr-010T80; Sat, 30 Apr 2011 21:07:34 +0200 Message-ID: <4DBC5DF4.7040009@oliver-heger.de> Date: Sat, 30 Apr 2011 21:07:32 +0200 From: Oliver Heger User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [CANCEL] Re: [VOTE] [LANG] Release Commons Lang 3.0 (based on RC3) References: <4DBB1594.6030801@oliver-heger.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:CoxX8rQ2E8ITxZl+yLEpt8HD60MgJwIoWdDoN5/hTkF PtCCWbF5X80B6lN0Fx09Lytt6IqdQ9dFLesWlfRcVp0zFxs8gU Pr1HCJBWYN+Wfyg9ZC+uZ5C+ur62wKtlsQqi7mtZyVIfvUN/2A qKHEmiUViLkTlRYKCQ4BI+IG9PetuKs5uj+nhksdaQZTss9Hs9 ZOX0FbIgG7sSQ6a2V/1kA== Am 29.04.2011 23:00, schrieb Henri Yandell: > Oops - I built on 1.6 and should have built on 1.5. I'll rebuild from > the tag and see if I get the error you get. > > Hen Sorry, still no luck, I get the same error. The test case only fails if the test class is executed as a whole. It succeeds if it is executed standalone. In the latter case a format object is newly created while it is obtained from the cache in the former case. I assume that the problem has something to do with the fact that my default locale is German which is also used explicitly by some of the tests. It seems that JDK 1.5 creates a new Locale instance when the default locale is changed. Thus the format object checked by the test has a German locale, but it is not the same instance as passed to the assertSame() condition. I suggest changing the test to use assertEquals() rather than assertSame(). This works in any case and should be a condition strong enough. Oliver > > On Fri, Apr 29, 2011 at 12:46 PM, Oliver Heger > wrote: >> When building with Java 1.5 I get a strange test error: >> >> ------------------------------------------------------------------------------- >> Test set: org.apache.commons.lang3.time.FastDateFormatTest >> ------------------------------------------------------------------------------- >> Tests run: 15, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.136 sec >> <<< FAILURE! >> test_getInstance_String_Locale(org.apache.commons.lang3.time.FastDateFormatTest) >> Time elapsed: 0.007 sec<<< FAILURE! >> junit.framework.AssertionFailedError: expected same: was not: >> at junit.framework.Assert.fail(Assert.java:47) >> at junit.framework.Assert.failNotSame(Assert.java:273) >> at junit.framework.Assert.assertSame(Assert.java:236) >> at junit.framework.Assert.assertSame(Assert.java:243) >> at >> org.apache.commons.lang3.time.FastDateFormatTest.test_getInstance_String_Locale(FastDateFormatTest.java:99) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:592) >> at junit.framework.TestCase.runTest(TestCase.java:168) >> at junit.framework.TestCase.runBare(TestCase.java:134) >> at junit.framework.TestResult$1.protect(TestResult.java:110) >> at junit.framework.TestResult.runProtected(TestResult.java:128) >> at junit.framework.TestResult.run(TestResult.java:113) >> at junit.framework.TestCase.run(TestCase.java:124) >> at junit.framework.TestSuite.runTest(TestSuite.java:232) >> at junit.framework.TestSuite.run(TestSuite.java:227) >> at >> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) >> at >> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) >> at >> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119) >> at >> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:592) >> at >> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) >> at $Proxy0.invoke(Unknown Source) >> at >> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) >> at >> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) >> at >> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) >> >> The build with JDK 1.6 does not have this problem. My specific Java version >> is >> java version "1.5.0_21" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_21-b01) >> Java HotSpot(TM) Client VM (build 1.5.0_21-b01, mixed mode, sharing) >> >> OS is Windows 7. Does anybody else see this error? >> >> Oliver >> >> Am 29.04.2011 08:47, schrieb Henri Yandell: >>> >>> Lang is ready to consider 3.0 release again. >>> >>> RC3 is available here: >>> >>> http://people.apache.org/~bayard/commons-lang3-3.0-RC3/ >>> >>> Maven artifacts: >>> >>> http://people.apache.org/~bayard/commons-lang3-3.0-RC3/maven/ >>> >>> Website: >>> >>> http://people.apache.org/~bayard/commons-lang3-3.0-RC3/site/ >>> >>> Note that there is a 2.6->3.0 Clirr report in the site that may prove >>> useful: >>> >>> >>> http://people.apache.org/~bayard/commons-lang3-3.0-RC3/site/lang2-lang3-clirr--report.html >>> >>> This vote will close no sooner than in 72 hours time, 0700 GMT 2-May 2011. >>> >>> ================ >>> [ ] +1 >>> [ ] -1, with reason >>> ================ >>> >>> Hen >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>> For additional commands, e-mail: dev-help@commons.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org