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));