From 0ced1692ae80673c1cb612d2d6baac9e2560b60c Mon Sep 17 00:00:00 2001 From: Grayswan4 <82980507+Grayswan4@users.noreply.github.com> Date: Wed, 21 Apr 2021 18:33:09 -0400 Subject: [PATCH] =?UTF-8?q?PreparedOperationBindableQuery.bindNull(?= =?UTF-8?q?=E2=80=A6)=20should=20call=20bindSpec.bindNull(=E2=80=A6).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wrong call is not caught by the compiler due to a bind method that has a signature of (String name, Object value). Previously, bindNull(…) called bind(…). Closes #587. --- .../r2dbc/repository/query/PreparedOperationBindableQuery.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java b/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java index 45175cf..74b6c4d 100644 --- a/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java +++ b/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java @@ -25,6 +25,7 @@ import org.springframework.util.Assert; * * @author Roman Chigvintsev * @author Mark Paluch + * @author Will Easterling */ class PreparedOperationBindableQuery implements BindableQuery { @@ -83,7 +84,7 @@ class PreparedOperationBindableQuery implements BindableQuery { @Override public void bindNull(int index, Class type) { - this.bindSpec = this.bindSpec.bind(index, type); + this.bindSpec = this.bindSpec.bindNull(index, type); } } }