Skip to content

Commit

Permalink
fix oversight in the api
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Jul 22, 2024
1 parent d88f51c commit ca46d3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/me/mrnavastar/sqlib/api/DataContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public <T> void put(SQLibType<T> type, @NonNull String field, T value) {
}

public <T> T get(SQLibType<T> type, @NonNull String field) {
return type.deserialize(connection.readField(store, id, field, type.getType().getClazz()));
Object value = connection.readField(store, id, field, type.getType().getClazz());
if (value == null) return null;
return type.deserialize(value);
}

public void clear(@NonNull String field) {
Expand Down

0 comments on commit ca46d3a

Please sign in to comment.