diff --git a/src/main/java/com/aerospike/jdbc/schema/AerospikeSchemaBuilder.java b/src/main/java/com/aerospike/jdbc/schema/AerospikeSchemaBuilder.java index 0d7c60e..716f693 100644 --- a/src/main/java/com/aerospike/jdbc/schema/AerospikeSchemaBuilder.java +++ b/src/main/java/com/aerospike/jdbc/schema/AerospikeSchemaBuilder.java @@ -51,7 +51,7 @@ public static List getSchema(SchemaTableName schemaTableName, IAeros bins.forEach((k, value) -> { logger.fine(() -> String.format("Bin: %s -> %s", k, value)); int t = getBinType(value); - if (t != 0) { + if (k != null && t != 0) { columnHandles.put(k, new DataColumn(schemaTableName.getSchemaName(), schemaTableName.getTableName(), t, k, k)); } diff --git a/src/main/java/com/aerospike/jdbc/sql/AerospikeRecordResultSet.java b/src/main/java/com/aerospike/jdbc/sql/AerospikeRecordResultSet.java index 86101a8..b62e250 100644 --- a/src/main/java/com/aerospike/jdbc/sql/AerospikeRecordResultSet.java +++ b/src/main/java/com/aerospike/jdbc/sql/AerospikeRecordResultSet.java @@ -8,7 +8,6 @@ import java.math.BigDecimal; import java.sql.Statement; import java.util.List; -import java.util.Objects; import java.util.Optional; import java.util.logging.Logger; @@ -56,7 +55,7 @@ public String getString(String columnLabel) { if (columnLabel.equals(defaultKeyName)) { return getUserKey().map(Value::toString).orElse(null); } - return getBin(columnLabel).map(Objects::toString).orElse(null); + return getBin(columnLabel).map(Object::toString).orElse(null); } @Override