Skip to content

Commit

Permalink
CB-4457. Fixed npe
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisSinelnikov committed Feb 12, 2024
1 parent 44e940d commit 9e79b53
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,16 @@ public void fetchRow(DBCSession session, DBCResultSet resultSet) throws DBCExcep
binding.getMetaAttribute(),
i);
row[i] = cellValue;
Method[] methods = Objects.requireNonNull(cellValue).getClass().getMethods();
for (Method method : methods) {
if (method.isAnnotationPresent(MetaData.class)){
if (metaDataMap == null) {
metaDataMap = new HashMap<>();
if (cellValue != null) {
Method[] methods = cellValue.getClass().getMethods();
for (Method method : methods) {
if (method.isAnnotationPresent(MetaData.class)) {
if (metaDataMap == null) {
metaDataMap = new HashMap<>();
}
Object value = method.invoke(cellValue);
metaDataMap.put(method.getAnnotation(MetaData.class).name(), value);
}
Object value = method.invoke(cellValue);
metaDataMap.put(method.getAnnotation(MetaData.class).name(), value);
}
}

Expand Down

0 comments on commit 9e79b53

Please sign in to comment.