From 0661ab5c773a4423f3b4bded356fc29f041baac0 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Thu, 23 Oct 2014 18:10:33 +0000 Subject: [PATCH] No need to explicitly extend Object. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1633907 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/lang3/ClassUtilsTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java index f613c3acd..fea5bba1a 100644 --- a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java @@ -77,7 +77,7 @@ public class ClassUtilsTest { assertEquals("", ClassUtils.getShortClassName(null, "")); // Inner types - class Named extends Object {} + class Named {} assertEquals("ClassUtilsTest.1", ClassUtils.getShortClassName(new Object(){}, "")); assertEquals("ClassUtilsTest.1Named", ClassUtils.getShortClassName(new Named(), "")); assertEquals("ClassUtilsTest.Inner", ClassUtils.getShortClassName(new Inner(), "")); @@ -119,7 +119,7 @@ public class ClassUtilsTest { assertEquals("String[][][][]", ClassUtils.getShortClassName(String[][][][].class)); // Inner types - class Named extends Object {} + class Named {} assertEquals("ClassUtilsTest.2", ClassUtils.getShortClassName(new Object(){}.getClass())); assertEquals("ClassUtilsTest.2Named", ClassUtils.getShortClassName(Named.class)); assertEquals("ClassUtilsTest.Inner", ClassUtils.getShortClassName(Inner.class)); @@ -171,7 +171,7 @@ public class ClassUtilsTest { assertEquals("String[][][][]", ClassUtils.getSimpleName(String[][][][].class)); // On-the-fly types - class Named extends Object {} + class Named {} assertEquals("", ClassUtils.getSimpleName(new Object(){}.getClass())); assertEquals("Named", ClassUtils.getSimpleName(Named.class)); } @@ -217,7 +217,7 @@ public class ClassUtilsTest { assertEquals("java.lang", ClassUtils.getPackageName(String[][][][].class)); // On-the-fly types - class Named extends Object {} + class Named {} assertEquals("org.apache.commons.lang3", ClassUtils.getPackageName(new Object(){}.getClass())); assertEquals("org.apache.commons.lang3", ClassUtils.getPackageName(Named.class)); } @@ -1133,7 +1133,7 @@ public class ClassUtilsTest { assertEquals("int[][]", ClassUtils.getShortCanonicalName(new int[0][0], "")); // Inner types - class Named extends Object {} + class Named {} assertEquals("ClassUtilsTest.6", ClassUtils.getShortCanonicalName(new Object(){}, "")); assertEquals("ClassUtilsTest.5Named", ClassUtils.getShortCanonicalName(new Named(), "")); assertEquals("ClassUtilsTest.Inner", ClassUtils.getShortCanonicalName(new Inner(), "")); @@ -1148,7 +1148,7 @@ public class ClassUtilsTest { assertEquals("int[][]", ClassUtils.getShortCanonicalName(int[][].class)); // Inner types - class Named extends Object {} + class Named {} assertEquals("ClassUtilsTest.7", ClassUtils.getShortCanonicalName(new Object(){}.getClass())); assertEquals("ClassUtilsTest.6Named", ClassUtils.getShortCanonicalName(Named.class)); assertEquals("ClassUtilsTest.Inner", ClassUtils.getShortCanonicalName(Inner.class)); @@ -1182,7 +1182,7 @@ public class ClassUtilsTest { assertEquals("", ClassUtils.getPackageCanonicalName(new int[0][0], "")); // Inner types - class Named extends Object {} + class Named {} assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(new Object(){}, "")); assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(new Named(), "")); assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(new Inner(), "")); @@ -1197,7 +1197,7 @@ public class ClassUtilsTest { assertEquals("", ClassUtils.getPackageCanonicalName(int[][].class)); // Inner types - class Named extends Object {} + class Named {} assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(new Object(){}.getClass())); assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(Named.class)); assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(Inner.class));