tdf#167495 Base need to close ResultSet after using it.
Change-Id: I02622911370b9929cbca66228a879fcdcb0f866e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189332 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
This commit is contained in:
@@ -20,6 +20,7 @@ package com.sun.star.wizards.db;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.sun.star.sdbc.SQLException;
|
||||
import com.sun.star.sdbc.XCloseable;
|
||||
import com.sun.star.sdbc.XResultSet;
|
||||
import com.sun.star.sdbc.XRow;
|
||||
import com.sun.star.uno.UnoRuntime;
|
||||
@@ -65,6 +66,11 @@ public class RelationController extends CommandName
|
||||
CommandName oCommandName = new CommandName(getCommandMetaData(), sForeignCatalog, sForeignScheme, sForeignTableName, false);
|
||||
aReferencedTableVector.add(oCommandName.getComposedName());
|
||||
}
|
||||
XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, xResultSet);
|
||||
if (xCloseable != null)
|
||||
{
|
||||
xCloseable.close();
|
||||
}
|
||||
sReferencedTableNames = new String[aReferencedTableVector.size()];
|
||||
aReferencedTableVector.toArray(sReferencedTableNames);
|
||||
}
|
||||
@@ -130,6 +136,11 @@ public class RelationController extends CommandName
|
||||
|
||||
}
|
||||
}
|
||||
XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, xResultSet);
|
||||
if (xCloseable != null)
|
||||
{
|
||||
xCloseable.close();
|
||||
}
|
||||
sKeyColumnNames = new String[2][aMasterFieldNamesVector.size()];
|
||||
sKeyColumnNames[0] = new String[aSlaveFieldNamesVector.size()];
|
||||
sKeyColumnNames[1] = new String[aMasterFieldNamesVector.size()];
|
||||
|
||||
Reference in New Issue
Block a user