summaryrefslogtreecommitdiff
path: root/odk/examples/java/Storage/Test08.java
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/java/Storage/Test08.java')
-rw-r--r--odk/examples/java/Storage/Test08.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/odk/examples/java/Storage/Test08.java b/odk/examples/java/Storage/Test08.java
index 8b29d2cbe5aa..4aef187901cc 100644
--- a/odk/examples/java/Storage/Test08.java
+++ b/odk/examples/java/Storage/Test08.java
@@ -43,7 +43,7 @@ public class Test08 implements StorageTest {
// create temporary storage based on arbitrary medium
// after such a storage is closed it is lost
Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
+ XStorage xTempStorage = UnoRuntime.queryInterface( XStorage.class, oTempStorage );
if ( xTempStorage == null )
{
m_aTestHelper.Error( "Can't create temporary storage representation!" );
@@ -52,7 +52,7 @@ public class Test08 implements StorageTest {
// set the global password for the root storage
XEncryptionProtectedSource xTempStorageEncryption =
- (XEncryptionProtectedSource) UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xTempStorage );
+ UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xTempStorage );
if ( xTempStorageEncryption == null )
{
@@ -127,11 +127,11 @@ public class Test08 implements StorageTest {
// create temporary storage based on a previously created temporary file
Object pArgs[] = new Object[2];
- pArgs[0] = (Object) sTempFileURL;
+ pArgs[0] = sTempFileURL;
pArgs[1] = new Integer( ElementModes.WRITE );
Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
+ XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
if ( xTempFileStorage == null )
{
m_aTestHelper.Error( "Can't create storage based on temporary file!" );
@@ -154,7 +154,7 @@ public class Test08 implements StorageTest {
// the temporary file must not be locked any more after storage disposing
pArgs[1] = new Integer( ElementModes.READ );
Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage );
+ XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage );
if ( xResultStorage == null )
{
m_aTestHelper.Error( "Can't reopen storage based on temporary file!" );
@@ -179,7 +179,7 @@ public class Test08 implements StorageTest {
// set the global password for the root storage
XEncryptionProtectedSource xResultStorageEncryption =
- (XEncryptionProtectedSource) UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xResultStorage );
+ UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xResultStorage );
if ( xResultStorageEncryption == null )
{