diff options
author | Noel Grandin <noel@peralex.com> | 2013-04-17 14:59:35 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-04-19 07:52:08 +0000 |
commit | 8d87758d65e4a03271f76e354dfc84c1fcd5fe21 (patch) | |
tree | bc8f4f0df6981ad10fe1333db1a2b015ea079709 /scripting/java | |
parent | d62425cc27e04a3237cfec2ea2663b8b11284ec8 (diff) |
Java cleanup, remove the rest of the unnecessary casts
Change-Id: Ia61d250f6b3711abc29569c5ece38a6f87e38daa
Reviewed-on: https://gerrit.libreoffice.org/3432
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'scripting/java')
3 files changed, 6 insertions, 6 deletions
diff --git a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java index d1c65bd5dfb8..d1c1c6d46c2b 100644 --- a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java +++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java @@ -73,7 +73,7 @@ public class XInputStreamImpl implements XInputStream long bytesSkipped = 0; try { - bytesSkipped = is.skip( (long)nBytesToSkip ); + bytesSkipped = is.skip( nBytesToSkip ); } catch ( IOException e ) { diff --git a/scripting/java/org/openoffice/idesupport/ExtensionFinder.java b/scripting/java/org/openoffice/idesupport/ExtensionFinder.java index 1edfba296fbd..55ceeb13c247 100644 --- a/scripting/java/org/openoffice/idesupport/ExtensionFinder.java +++ b/scripting/java/org/openoffice/idesupport/ExtensionFinder.java @@ -50,7 +50,7 @@ public class ExtensionFinder implements MethodFinder { findFiles(files, basedir, parcelName); if (files.size() != 0) - return (ScriptEntry[])files.toArray(empty); + return files.toArray(empty); return empty; } diff --git a/scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java b/scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java index faba9d79df12..3a6d946b4c98 100644 --- a/scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java +++ b/scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java @@ -86,7 +86,7 @@ public final class LocalOfficeImpl Object object = null; object = mComponentContext.getValueByName(STORAGE_MRG_SINGLETON); XScriptStorageManager storageMgr; - storageMgr = (XScriptStorageManager)UnoRuntime.queryInterface( + storageMgr = UnoRuntime.queryInterface( XScriptStorageManager.class, object); storageMgr.refreshScriptStorage(uri); } catch (java.lang.Exception ex) { @@ -128,13 +128,13 @@ System.out.println("*** LocalOfficeImpl.refreshStorage: DONE"); "uno:socket,host=localhost,port=" + port + ";urp;StarOffice.ServiceManager"); - mComponentFactory = (XMultiComponentFactory)UnoRuntime.queryInterface( + mComponentFactory = UnoRuntime.queryInterface( XMultiComponentFactory.class, object); XPropertySet factoryProps; - factoryProps = (XPropertySet)UnoRuntime.queryInterface( + factoryProps = UnoRuntime.queryInterface( XPropertySet.class, mComponentFactory); object = factoryProps.getPropertyValue("DefaultContext"); - mComponentContext = (XComponentContext)UnoRuntime.queryInterface( + mComponentContext = UnoRuntime.queryInterface( XComponentContext.class, object); } } |