This is an automated email from the ASF dual-hosted git repository.
jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 561d1b2321 sdbc_jdbc: allow createStatement while dispose notifies
listeners
561d1b2321 is described below
commit 561d1b232108581a27ae4ca2c39961ecf5fce55f
Author: Jim Jagielski <[email protected]>
AuthorDate: Sat Nov 7 11:18:01 2026 -0500
sdbc_jdbc: allow createStatement while dispose notifies listeners
The HSQLDB driver sends SHUTDOWN from its disposing() listener;
checkDisposed()
refused it, so an embedded database was never shut down on close!
---
.../src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
b/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
index 39538857e4..8baf1d8e48 100644
---
a/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
+++
b/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
@@ -35,6 +35,7 @@ import com.sun.star.beans.PropertyValue;
import com.sun.star.comp.sdbc.classloading.ClassLoaderAndClass;
import com.sun.star.comp.sdbc.ConnectionLog.ObjectType;
import com.sun.star.container.XNameAccess;
+import com.sun.star.lang.DisposedException;
import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XServiceInfo;
@@ -175,7 +176,10 @@ public class JavaSQLConnection extends ComponentBase
@Override
public synchronized XStatement createStatement() throws SQLException {
- checkDisposed();
+ // not checkDisposed(): the HSQLDB driver sends SHUTDOWN from its
disposing() listener
+ if (bDisposed) {
+ throw new DisposedException();
+ }
logger.log(LogLevel.FINE, Resources.STR_LOG_CREATE_STATEMENT);
JavaSQLStatement statement = new JavaSQLStatement(this);
statements.put(statement, statement);