Skip to content

Commit a33b7bb

Browse files
committed
Close-suppressing Connection proxy exposes target isClosed() state
Closes gh-24853
1 parent 56e7d73 commit a33b7bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 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.
@@ -322,7 +322,7 @@ else if (method.getName().equals("close")) {
322322
return null;
323323
}
324324
else if (method.getName().equals("isClosed")) {
325-
return false;
325+
return this.target.isClosed();
326326
}
327327
else if (method.getName().equals("getTargetConnection")) {
328328
// Handle getTargetConnection method: return underlying Connection.

0 commit comments

Comments
 (0)