Skip to content

Commit c5d3bcf

Browse files
committed
Restore original 4.x behavior for initialization of function return name
Closes gh-25707 (cherry picked from commit 40bf83c)
1 parent 9b7f64a commit c5d3bcf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataContext.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -355,7 +355,7 @@ protected List<SqlParameter> reconcileParameters(List<SqlParameter> parameters)
355355
logger.debug("Using declared out parameter '" + paramName +
356356
"' for function return value");
357357
}
358-
setFunctionReturnName(paramName);
358+
this.actualFunctionReturnName = paramName;
359359
returnDeclared = true;
360360
}
361361
}
@@ -393,8 +393,8 @@ protected List<SqlParameter> reconcileParameters(List<SqlParameter> parameters)
393393
"Unable to locate declared parameter for function return value - " +
394394
" add a SqlOutParameter with name '" + getFunctionReturnName() + "'");
395395
}
396-
else if (paramName != null) {
397-
setFunctionReturnName(paramName);
396+
else {
397+
this.actualFunctionReturnName = param.getName();
398398
}
399399
}
400400
else {
@@ -422,7 +422,7 @@ else if (paramName != null) {
422422
(StringUtils.hasLength(paramNameToUse) ? paramNameToUse : getFunctionReturnName());
423423
workParams.add(provider.createDefaultOutParameter(returnNameToUse, meta));
424424
if (isFunction()) {
425-
setFunctionReturnName(returnNameToUse);
425+
this.actualFunctionReturnName = returnNameToUse;
426426
outParamNames.add(returnNameToUse);
427427
}
428428
if (logger.isDebugEnabled()) {

0 commit comments

Comments
 (0)