Skip to content

Commit

Permalink
Fix nullability of FieldDataProvider in FBPreparedStatement
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Sep 25, 2024
1 parent 0505fb6 commit 98149c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/org/firebirdsql/jdbc/FBPreparedStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -794,11 +794,11 @@ protected void prepareFixedStatement(String sql) throws SQLException {
final int fieldPosition = i;

FieldDataProvider dataProvider = new FieldDataProvider() {
public byte[] getFieldData() {
public byte @Nullable [] getFieldData() {
return fieldValues.getFieldData(fieldPosition);
}

public void setFieldData(byte[] data) {
public void setFieldData(byte @Nullable [] data) {
fieldValues.setFieldData(fieldPosition, data);
}
};
Expand Down
6 changes: 4 additions & 2 deletions src/main/org/firebirdsql/jdbc/field/FieldDataProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.firebirdsql.jdbc.field;

import org.jspecify.annotations.Nullable;

/**
* Provider of the row data.
*
Expand All @@ -32,13 +34,13 @@ public interface FieldDataProvider {
* @return contents of the field or <code>null</code> if NULL value was
* sent from the server.
*/
byte[] getFieldData();
byte @Nullable [] getFieldData();

/**
* Set raw content of the field.
*
* @param data raw content of the field.
*/
void setFieldData(byte[] data);
void setFieldData(byte @Nullable [] data);

}

0 comments on commit 98149c3

Please sign in to comment.