Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 68710 invoked from network); 14 Mar 2009 13:37:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2009 13:37:44 -0000 Received: (qmail 87674 invoked by uid 500); 14 Mar 2009 13:37:43 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 87623 invoked by uid 500); 14 Mar 2009 13:37:42 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 87614 invoked by uid 99); 14 Mar 2009 13:37:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2009 06:37:42 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2009 13:37:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 168CA23888A6; Sat, 14 Mar 2009 13:37:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r753654 - /commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/HashCodeBuilderTest.java Date: Sat, 14 Mar 2009 13:37:21 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090314133722.168CA23888A6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebb Date: Sat Mar 14 13:37:21 2009 New Revision: 753654 URL: http://svn.apache.org/viewvc?rev=753654&view=rev Log: Fix various Eclipse warnings (casts, unused vars) Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/HashCodeBuilderTest.java Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/HashCodeBuilderTest.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/HashCodeBuilderTest.java?rev=753654&r1=753653&r2=753654&view=diff ============================================================================== --- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/HashCodeBuilderTest.java (original) +++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/HashCodeBuilderTest.java Sat Mar 14 13:37:21 2009 @@ -36,6 +36,7 @@ static class ReflectionTestCycleA { ReflectionTestCycleB b; + @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } @@ -47,6 +48,7 @@ static class ReflectionTestCycleB { ReflectionTestCycleA a; + @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } @@ -66,10 +68,12 @@ return suite; } + @Override protected void setUp() throws Exception { super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); } @@ -103,6 +107,7 @@ this.a = a; } + @Override public boolean equals(Object o) { if (o == this) { return true; @@ -126,6 +131,7 @@ static class TestSubObject extends TestObject { private int b; + @SuppressWarnings("unused") transient private int t; public TestSubObject() { @@ -138,6 +144,7 @@ this.t = t; } + @Override public boolean equals(Object o) { if (o == this) { return true; @@ -222,12 +229,14 @@ assertEquals(17 * 37 + obj.hashCode(), new HashCodeBuilder(17, 37).append(obj).toHashCode()); } + @SuppressWarnings("cast") // cast is not really needed, keep for consistency public void testLong() { assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((long) 0L).toHashCode()); assertEquals(17 * 37 + (int) (123456789L ^ (123456789L >> 32)), new HashCodeBuilder(17, 37).append( (long) 123456789L).toHashCode()); } + @SuppressWarnings("cast") // cast is not really needed, keep for consistency public void testInt() { assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((int) 0).toHashCode()); assertEquals(17 * 37 + 123456, new HashCodeBuilder(17, 37).append((int) 123456).toHashCode()); @@ -248,6 +257,7 @@ assertEquals(17 * 37 + 123, new HashCodeBuilder(17, 37).append((byte) 123).toHashCode()); } + @SuppressWarnings("cast") // cast is not really needed, keep for consistency public void testDouble() { assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((double) 0d).toHashCode()); double d = 1234567.89; @@ -255,6 +265,7 @@ assertEquals(17 * 37 + (int) (l ^ (l >> 32)), new HashCodeBuilder(17, 37).append(d).toHashCode()); } + @SuppressWarnings("cast") // cast is not really needed, keep for consistency public void testFloat() { assertEquals(17 * 37, new HashCodeBuilder(17, 37).append((float) 0f).toHashCode()); float f = 1234.89f; @@ -490,10 +501,13 @@ } static class TestObjectWithMultipleFields { + @SuppressWarnings("unused") private int one = 0; + @SuppressWarnings("unused") private int two = 0; + @SuppressWarnings("unused") private int three = 0; public TestObjectWithMultipleFields(int one, int two, int three) {