snap-admin
snap-admin copied to clipboard
Handle null values in DbQueryOutputField.getType
https://github.com/aileftech/snap-admin/blob/e9c5e52d15efc5feac57a5277f6dc7d3bfe0fe67/src/main/java/tech/ailef/snapadmin/external/dbmapping/query/DbQueryOutputField.java#L125
Please add NullPointerException in the catch clause as follows:
try {
DbFieldType type = DbFieldType.fromClass(result.get(this).getClass()).getConstructor().newInstance();
return type.toString();
} catch (UnsupportedFieldTypeException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException | NullPointerException e) {
return "-";
}