use 1.5 method for determining inner class-ness; null safety is really the only remaining advantage of #isInnerClass. This goes nicely with r919340

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@980562 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Matthew Jason Benson 2010-07-29 20:22:58 +00:00
parent b74e64b211
commit 3296f58f71
1 changed files with 1 additions and 4 deletions

View File

@ -730,10 +730,7 @@ public static Class<?>[] wrappersToPrimitives(Class<?>[] classes) {
* false if not or <code>null</code> * false if not or <code>null</code>
*/ */
public static boolean isInnerClass(Class<?> cls) { public static boolean isInnerClass(Class<?> cls) {
if (cls == null) { return cls != null && cls.getEnclosingClass() != null;
return false;
}
return cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0;
} }
// Class loading // Class loading