Dispose some test components
Otherwise, JunitTest_forms_unoapi_2 left behind two instances of frm::OGridControlModel. Change-Id: Idaf7bae26b18e20821968ebf52e7864043963e03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159422 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -33,6 +33,7 @@ import com.sun.star.io.XObjectInputStream;
|
|||||||
import com.sun.star.io.XObjectOutputStream;
|
import com.sun.star.io.XObjectOutputStream;
|
||||||
import com.sun.star.io.XOutputStream;
|
import com.sun.star.io.XOutputStream;
|
||||||
import com.sun.star.io.XPersistObject;
|
import com.sun.star.io.XPersistObject;
|
||||||
|
import com.sun.star.lang.XComponent;
|
||||||
import com.sun.star.uno.UnoRuntime;
|
import com.sun.star.uno.UnoRuntime;
|
||||||
|
|
||||||
|
|
||||||
@@ -154,6 +155,11 @@ public class _XPersistObject extends MultiMethodTest {
|
|||||||
}
|
}
|
||||||
bResult &= locRes;
|
bResult &= locRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy);
|
||||||
|
if (comp != null) {
|
||||||
|
comp.dispose();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Object oCopy = tParam.getMSF().createInstance(sname);
|
Object oCopy = tParam.getMSF().createInstance(sname);
|
||||||
XPersistObject persCopy = UnoRuntime.queryInterface(XPersistObject.class, oCopy);
|
XPersistObject persCopy = UnoRuntime.queryInterface(XPersistObject.class, oCopy);
|
||||||
@@ -162,6 +168,10 @@ public class _XPersistObject extends MultiMethodTest {
|
|||||||
|
|
||||||
bResult = persCopy.getServiceName().equals(sname);
|
bResult = persCopy.getServiceName().equals(sname);
|
||||||
|
|
||||||
|
XComponent comp = UnoRuntime.queryInterface(XComponent.class, oCopy);
|
||||||
|
if (comp != null) {
|
||||||
|
comp.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (com.sun.star.uno.Exception e) {
|
} catch (com.sun.star.uno.Exception e) {
|
||||||
|
@@ -22,6 +22,7 @@ import lib.MultiMethodTest;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import com.sun.star.lang.XComponent;
|
||||||
import com.sun.star.lang.XServiceInfo;
|
import com.sun.star.lang.XServiceInfo;
|
||||||
import com.sun.star.lang.XTypeProvider;
|
import com.sun.star.lang.XTypeProvider;
|
||||||
import com.sun.star.uno.UnoRuntime;
|
import com.sun.star.uno.UnoRuntime;
|
||||||
@@ -57,6 +58,11 @@ public class _XCloneable extends MultiMethodTest {
|
|||||||
result &= checkImplementationID(oObj, clone);
|
result &= checkImplementationID(oObj, clone);
|
||||||
|
|
||||||
tRes.tested("createClone()", result) ;
|
tRes.tested("createClone()", result) ;
|
||||||
|
|
||||||
|
XComponent comp = UnoRuntime.queryInterface(XComponent.class, clone);
|
||||||
|
if (comp != null) {
|
||||||
|
comp.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected byte[] getImplementationID(XInterface ifc) {
|
protected byte[] getImplementationID(XInterface ifc) {
|
||||||
|
Reference in New Issue
Block a user