Skip to content

Commit cfd9b34

Browse files
committed
Process NULLABLE column as integer instead of boolean
Issue: SPR-15333 (cherry picked from commit 79ea779)
1 parent d3324c8 commit cfd9b34

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -361,15 +361,14 @@ else if (found.isEmpty()) {
361361
columnType == DatabaseMetaData.procedureColumnOut)) {
362362
if (logger.isDebugEnabled()) {
363363
logger.debug("Skipping metadata for: " + columnType + " " + procs.getInt("DATA_TYPE") +
364-
" " + procs.getString("TYPE_NAME") + " " + procs.getBoolean("NULLABLE") +
365-
" (probably a member of a collection)"
366-
);
364+
" " + procs.getString("TYPE_NAME") + " " + procs.getInt("NULLABLE") +
365+
" (probably a member of a collection)");
367366
}
368367
}
369368
else {
370369
CallParameterMetaData meta = new CallParameterMetaData(columnName, columnType,
371-
procs.getInt("DATA_TYPE"), procs.getString("TYPE_NAME"), procs.getBoolean("NULLABLE")
372-
);
370+
procs.getInt("DATA_TYPE"), procs.getString("TYPE_NAME"),
371+
procs.getInt("NULLABLE") == DatabaseMetaData.procedureNullable);
373372
this.callParameterMetaData.add(meta);
374373
if (logger.isDebugEnabled()) {
375374
logger.debug("Retrieved metadata: " + meta.getParameterName() + " " +

0 commit comments

Comments
 (0)