snap-admin icon indicating copy to clipboard operation
snap-admin copied to clipboard

Handle null values in DbQueryOutputField.getType

Open chriskormaris opened this issue 3 months ago • 0 comments

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 "-"; }

chriskormaris avatar Nov 10 '25 14:11 chriskormaris