Skip to content

Commit

Permalink
Fixed GWT compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
davebaol committed Oct 4, 2014
1 parent 0fe4598 commit 12afd57
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,12 @@ public Node<E> process (String line) {
} else if ("task".equals(type)) {
String className = frags[1];
try {
Class<?> clazz = ClassReflection.forName(className);
@SuppressWarnings("unchecked")
Node<E> newInstance = (Node<E>)ClassReflection.forName(className).newInstance();
Node<E> newInstance = (Node<E>)ClassReflection.newInstance(clazz);
return newInstance;
} catch (ReflectionException e) {
Gdx.app.log(TreeLineProcessor.class.getName(), null, e);
} catch (InstantiationException ex) {
Gdx.app.log(TreeLineProcessor.class.getName(), null, ex);
} catch (IllegalAccessException ex) {
Gdx.app.log(TreeLineProcessor.class.getName(), null, ex);
}
}
return null;
Expand Down

0 comments on commit 12afd57

Please sign in to comment.