You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2017/02/14 21:51:57 UTC

[lang] ObjectUtilsTest: remove commented-out code

Repository: commons-lang
Updated Branches:
  refs/heads/master b715d18f0 -> aaeb4c621


ObjectUtilsTest: remove commented-out code


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/aaeb4c62
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/aaeb4c62
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/aaeb4c62

Branch: refs/heads/master
Commit: aaeb4c621a88facc673949003713d259ac67f0dd
Parents: b715d18
Author: pascalschumacher <pa...@gmx.net>
Authored: Tue Feb 14 22:51:45 2017 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Tue Feb 14 22:51:45 2017 +0100

----------------------------------------------------------------------
 .../apache/commons/lang3/ObjectUtilsTest.java   | 44 --------------------
 1 file changed, 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aaeb4c62/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java b/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
index 1f3ae54..5d3f0a2 100644
--- a/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
@@ -82,9 +82,6 @@ public class ObjectUtilsTest {
         // Cast to Object in line below ensures compiler doesn't complain of unchecked generic array creation
         assertNull(ObjectUtils.firstNonNull((Object) null, (Object) null));
         
-//        assertSame("123", ObjectUtils.firstNonNull(null, ObjectUtils.NULL, "123", "456"));
-//        assertSame("456", ObjectUtils.firstNonNull(ObjectUtils.NULL, "456", "123", null));
-//        assertNull(ObjectUtils.firstNonNull(null, null, ObjectUtils.NULL));
         assertNull(ObjectUtils.firstNonNull((Object) null));
         assertNull(ObjectUtils.firstNonNull((Object[]) null));
     }
@@ -173,47 +170,6 @@ public class ObjectUtilsTest {
         assertEquals(list3.hashCode(), ObjectUtils.hashCodeMulti("a", "b", "c"));
     }
 
-//    /**
-//     * Show that java.util.Date and java.sql.Timestamp are apples and oranges.
-//     * Prompted by an email discussion. 
-//     * 
-//     * The behavior is different b/w Sun Java 1.3.1_10 and 1.4.2_03.
-//     */
-//    public void testDateEqualsJava() {
-//        long now = 1076957313284L; // Feb 16, 2004 10:49... PST
-//        java.util.Date date = new java.util.Date(now);
-//        java.sql.Timestamp realTimestamp = new java.sql.Timestamp(now);
-//        java.util.Date timestamp = realTimestamp;
-//        // sanity check 1:
-//        assertEquals(284000000, realTimestamp.getNanos());
-//        assertEquals(1076957313284L, date.getTime());
-//        //
-//        // On Sun 1.3.1_10:
-//        //junit.framework.AssertionFailedError: expected:<1076957313284> but was:<1076957313000>
-//        //
-//        //assertEquals(1076957313284L, timestamp.getTime());
-//        //
-//        //junit.framework.AssertionFailedError: expected:<1076957313284> but was:<1076957313000>
-//        //
-//        //assertEquals(1076957313284L, realTimestamp.getTime());
-//        // sanity check 2:        
-//        assertEquals(date.getDay(), realTimestamp.getDay());
-//        assertEquals(date.getHours(), realTimestamp.getHours());
-//        assertEquals(date.getMinutes(), realTimestamp.getMinutes());
-//        assertEquals(date.getMonth(), realTimestamp.getMonth());
-//        assertEquals(date.getSeconds(), realTimestamp.getSeconds());
-//        assertEquals(date.getTimezoneOffset(), realTimestamp.getTimezoneOffset());
-//        assertEquals(date.getYear(), realTimestamp.getYear());
-//        //
-//        // Time values are == and equals() on Sun 1.4.2_03 but NOT on Sun 1.3.1_10:
-//        //
-//        //assertFalse("Sanity check failed: date.getTime() == timestamp.getTime()", date.getTime() == timestamp.getTime());
-//        //assertFalse("Sanity check failed: timestamp.equals(date)", timestamp.equals(date));
-//        //assertFalse("Sanity check failed: date.equals(timestamp)", date.equals(timestamp));
-//        // real test:
-//        //assertFalse("java.util.Date and java.sql.Timestamp should be equal", ObjectUtils.equals(date, timestamp));
-//    }
-    
     @Test
     public void testIdentityToStringStringBuffer() {
         final Integer i = Integer.valueOf(45);