Skip to content
Snippets Groups Projects
Commit 3fd49854 authored by Matias Mennecart's avatar Matias Mennecart
Browse files

léger fix

parent 08811b2c
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,8 @@ public class Pokemon extends LoadableData{
*/
@Override
public String getClassification() throws IllegalAccessException {
return (String) this.getClass().getDeclaredFields()[classificationType].get(this).toString();
Object field = this.getClass().getDeclaredFields()[classificationType].get(this);
return (field == null) ? "undefined" : field.toString();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment