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:
parent
1e282a9643
commit
bb8709f3e3
|
@ -156,7 +156,7 @@ public class ClassUtils {
|
|||
if (object == null) {
|
||||
return valueIfNull;
|
||||
}
|
||||
return getShortClassName(object.getClass().getName());
|
||||
return getShortClassName(object.getClass());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,7 +211,7 @@ public class ClassUtils {
|
|||
if (object == null) {
|
||||
return valueIfNull;
|
||||
}
|
||||
return getPackageName(object.getClass().getName());
|
||||
return getPackageName(object.getClass());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue