Prefering the Class methods (and thus JDK) over the String methods for getShortClassName/getPackageName when you already have an Object

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@824597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2009-10-13 05:50:51 +00:00
parent 1e282a9643
commit bb8709f3e3
1 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ public static String getShortClassName(Object object, String valueIfNull) {
if (object == null) {
return valueIfNull;
}
return getShortClassName(object.getClass().getName());
return getShortClassName(object.getClass());
}
/**
@ -211,7 +211,7 @@ public static String getPackageName(Object object, String valueIfNull) {
if (object == null) {
return valueIfNull;
}
return getPackageName(object.getClass().getName());
return getPackageName(object.getClass());
}
/**