mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-06 18:18:22 +00:00
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:
parent
b74e64b211
commit
3296f58f71
@ -730,10 +730,7 @@ public static Class<?>[] wrappersToPrimitives(Class<?>[] classes) {
|
||||
* false if not or <code>null</code>
|
||||
*/
|
||||
public static boolean isInnerClass(Class<?> cls) {
|
||||
if (cls == null) {
|
||||
return false;
|
||||
}
|
||||
return cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0;
|
||||
return cls != null && cls.getEnclosingClass() != null;
|
||||
}
|
||||
|
||||
// Class loading
|
||||
|
Loading…
x
Reference in New Issue
Block a user