Author: swd847
Date: 2010-03-30 23:21:16 -0400 (Tue, 30 Mar 2010)
New Revision: 6070
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/ReflectionUtils.java
Log:
WELDX-89
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/ReflectionUtils.java
===================================================================
---
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/ReflectionUtils.java 2010-03-30
10:22:59 UTC (rev 6069)
+++
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/ReflectionUtils.java 2010-03-31
03:21:16 UTC (rev 6070)
@@ -19,7 +19,7 @@
{
HashSet<Field> ret = new HashSet<Field>();
Class<?> p = clazz;
- while (p != Object.class)
+ while (p != null && p != Object.class)
{
for (Field a : p.getDeclaredFields())
{
@@ -33,7 +33,7 @@
public static Field getField(Class<?> parent, String name)
{
Class<?> p = parent;
- while (p != Object.class)
+ while (p != null && p != Object.class)
{
try
{
@@ -51,7 +51,7 @@
public static boolean methodExists(Class<?> parent, String name)
{
Class<?> p = parent;
- while (p != Object.class)
+ while (p != null && p != Object.class)
{
for (Method m : p.getDeclaredMethods())
{
@@ -69,7 +69,7 @@
{
HashSet<Method> ret = new HashSet<Method>();
Class<?> p = clazz;
- while (p != Object.class)
+ while (p != null && p != Object.class)
{
for (Method a : p.getDeclaredMethods())
{
@@ -83,7 +83,7 @@
public static Method getMethod(Class<?> parent, String name, Class<?>...
args)
{
Class<?> p = parent;
- while (p != Object.class)
+ while (p != null && p != Object.class)
{
try
{
@@ -101,7 +101,7 @@
public static Constructor<?> getConstructor(Class<?> parent,
Class<?>... args)
{
Class<?> p = parent;
- while (p != Object.class)
+ while (p != null && p != Object.class)
{
try
{
Show replies by date