You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/09/15 15:11:26 UTC

[GitHub] [commons-lang] garydgregory commented on a diff in pull request #949: LANG-1691: ClassUtils.getShortCanonicalName - using canonicalName rat…

garydgregory commented on code in PR #949:
URL: https://github.com/apache/commons-lang/pull/949#discussion_r972116172


##########
src/test/java/org/apache/commons/lang3/ClassUtilsTest.java:
##########
@@ -540,12 +539,11 @@ public void test_getShortCanonicalName_Object() {
         class Named {
             // empty
         }
-        // WARNING: this is fragile, implementation may change, naming is not guaranteed
-        assertEquals("ClassUtilsTest.9", ClassUtils.getShortCanonicalName(new Object() {
+        assertEquals("", ClassUtils.getShortCanonicalName(new Object() {
             // empty
         }, "<null>"));
-        assertEquals("ClassUtilsTest.9Named", ClassUtils.getShortCanonicalName(new Named(), "<null>"));
-        assertEquals("ClassUtilsTest.Inner", ClassUtils.getShortCanonicalName(new Inner(), "<null>"));
+        assertEquals("", ClassUtils.getShortCanonicalName(new Named(), "<null>"));

Review Comment:
   This seems obviously no good to me because "Named" is a real concrete class defined in this very file, it's name is not "". What am I missing?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org