Skip to content

Commit f929109

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

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.
@@ -316,7 +316,7 @@ else if (method.getName().equals("close")) {
316316
return null;
317317
}
318318
else if (method.getName().equals("isClosed")) {
319-
return false;
319+
return this.target.isClosed();
320320
}
321321
else if (method.getName().equals("getTargetConnection")) {
322322
// Handle getTargetConnection method: return underlying Connection.

0 commit comments

Comments
 (0)