Skip to content

Commit

Permalink
When NoClassDefFoundError was thrown, skip the surrounding field or m…
Browse files Browse the repository at this point in the history
…ethod and continue.
  • Loading branch information
Atsushi Eno committed Jun 25, 2012
1 parent b3fea22 commit cf4dd24
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions JavaClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ int getConstructorParameterOffset (Constructor ctor)
}

void appendField (Field field, FieldNode asmField, Document doc, Element parent)
{
try {
doAppendField (field, asmField, doc, parent);
} catch (NoClassDefFoundError ex) {
System.err.println ("WARNING: missing class error was raised while reflecting " + field.getName () + " [" + field + "] : " + ex.getMessage ());
}
}

void doAppendField (Field field, FieldNode asmField, Document doc, Element parent)
{
int mods = field.getModifiers ();
if (!Modifier.isPublic (mods) && !Modifier.isProtected (mods))
Expand Down Expand Up @@ -269,6 +278,15 @@ String doEscapeLiteral (StringBuilder s, int i)
}

void appendMethod (Method method, Document doc, Element parent)
{
try {
doAppendMethod (method, doc, parent);
} catch (NoClassDefFoundError ex) {
System.err.println ("WARNING: missing class error was raised while reflecting " + method.getName () + " [" + method + "] : " + ex.getMessage ());
}
}

void doAppendMethod (Method method, Document doc, Element parent)
{
int mods = method.getModifiers ();
if (!Modifier.isPublic (mods) && !Modifier.isProtected (mods))
Expand Down

0 comments on commit cf4dd24

Please sign in to comment.