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
This commit is contained in:
parent
ef26a66763
commit
0661ab5c77
|
@ -77,7 +77,7 @@ public class ClassUtilsTest {
|
|||
assertEquals("<null>", ClassUtils.getShortClassName(null, "<null>"));
|
||||
|
||||
// Inner types
|
||||
class Named extends Object {}
|
||||
class Named {}
|
||||
assertEquals("ClassUtilsTest.1", ClassUtils.getShortClassName(new Object(){}, "<null>"));
|
||||
assertEquals("ClassUtilsTest.1Named", ClassUtils.getShortClassName(new Named(), "<null>"));
|
||||
assertEquals("ClassUtilsTest.Inner", ClassUtils.getShortClassName(new Inner(), "<null>"));
|
||||
|
@ -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], "<null>"));
|
||||
|
||||
// Inner types
|
||||
class Named extends Object {}
|
||||
class Named {}
|
||||
assertEquals("ClassUtilsTest.6", ClassUtils.getShortCanonicalName(new Object(){}, "<null>"));
|
||||
assertEquals("ClassUtilsTest.5Named", ClassUtils.getShortCanonicalName(new Named(), "<null>"));
|
||||
assertEquals("ClassUtilsTest.Inner", ClassUtils.getShortCanonicalName(new Inner(), "<null>"));
|
||||
|
@ -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], "<null>"));
|
||||
|
||||
// Inner types
|
||||
class Named extends Object {}
|
||||
class Named {}
|
||||
assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(new Object(){}, "<null>"));
|
||||
assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(new Named(), "<null>"));
|
||||
assertEquals("org.apache.commons.lang3", ClassUtils.getPackageCanonicalName(new Inner(), "<null>"));
|
||||
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue