diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 15:29:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-08 09:48:20 +0200 |
commit | 616b3ad50404f35d84708b3feeb8c66f2f23f1b1 (patch) | |
tree | fbff023a34b3cc62b2c5beb592b95e65ce28251b /scripting/java/com/sun/star | |
parent | b6a83e99c8f4442c3c96198ac816dcb99419a67e (diff) |
java: remove exceptions from throws clauses that are not
.. actually thrown
Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
Diffstat (limited to 'scripting/java/com/sun/star')
7 files changed, 4 insertions, 44 deletions
diff --git a/scripting/java/com/sun/star/script/framework/container/Parcel.java b/scripting/java/com/sun/star/script/framework/container/Parcel.java index 6e3ba9fb4ce2..e6997763d662 100644 --- a/scripting/java/com/sun/star/script/framework/container/Parcel.java +++ b/scripting/java/com/sun/star/script/framework/container/Parcel.java @@ -277,10 +277,11 @@ public class Parcel implements XNameContainer } // rename parcel - public void rename( String name ) throws com.sun.star.lang.WrappedTargetException + public void rename( String name ) { this.name = name; } + public ParcelContainer getParent() { return parent; } /** * Returns the path of this <tt>Parcel</tt> diff --git a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java index c4bf49e3c4e9..98c54a6ff5f6 100644 --- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java +++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java @@ -235,7 +235,7 @@ public class ScriptMetaData extends ScriptEntry { return "\nParcelLocation = " + getParcelLocation() + "\nLocationPlaceHolder = " + locationPlaceHolder + super.toString(); } - public URL[] getClassPath() throws java.net.MalformedURLException + public URL[] getClassPath() { try { diff --git a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java index 3b1cd1db7aa1..fb470a25fe15 100644 --- a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java @@ -137,7 +137,7 @@ public class UnoPkgContainer extends ParcelContainer LogUtils.DEBUG("Leaving deRegisterPackageContainer for " + url ); } - private void init() throws com.sun.star.lang.IllegalArgumentException, com.sun.star.lang.WrappedTargetException + private void init() throws com.sun.star.lang.IllegalArgumentException { LogUtils.DEBUG("getting container for " + containerUrl ); DeployedUnoPackagesDB db = null; diff --git a/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java b/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java index 4086a3c29741..8ec9b0a08fe8 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java +++ b/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java @@ -31,7 +31,6 @@ public class ClassLoaderFactory private ClassLoaderFactory() {} public static ClassLoader getURLClassLoader( ScriptMetaData scriptData ) - throws NoSuitableClassLoaderException, MalformedURLException { ClassLoader parent = scriptData.getClass().getClassLoader(); URL[] classPath = scriptData.getClassPath(); diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java index d19a772d2d7f..cf4bcf114cf3 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java @@ -198,14 +198,6 @@ class ScriptImpl implements XScript metaData.getLanguageName(), metaData.getLanguage(), ScriptFrameworkErrorType.MALFORMED_URL ); } - catch ( NoSuitableClassLoaderException nsc ) - { - // Framework error - throw new ScriptFrameworkErrorException( - nsc.getMessage(), null, - metaData.getLanguageName(), metaData.getLanguage(), - ScriptFrameworkErrorType.UNKNOWN ); - } // Set class loader to be used for class files // and jar files Thread.currentThread().setContextClassLoader(cl); diff --git a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java index 090f1626e0d7..07bde156c7b8 100644 --- a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java +++ b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java @@ -30,8 +30,6 @@ import com.sun.star.uno.Any; import java.util.ArrayList; import java.util.Map; -import java.net.MalformedURLException; - import com.sun.star.script.provider.XScriptContext; import com.sun.star.script.provider.XScript; import com.sun.star.script.provider.ScriptExceptionRaisedException; @@ -194,28 +192,6 @@ class ScriptImpl implements XScript metaData ); LogUtils.DEBUG( "Classloader finished..." ); } - catch (MalformedURLException mfe ) - { - // Framework error - ScriptFrameworkErrorException e2 = - new ScriptFrameworkErrorException( - mfe.toString(), null, - metaData.getLanguageName(), metaData.getLanguage(), - ScriptFrameworkErrorType.MALFORMED_URL ); - e2.initCause( mfe ); - throw e2; - } - catch (NoSuitableClassLoaderException ncl ) - { - // Framework error - ScriptFrameworkErrorException e2 = - new ScriptFrameworkErrorException( - ncl.toString(), null, - metaData.getLanguageName(), metaData.getLanguage(), - ScriptFrameworkErrorType.UNKNOWN ); - e2.initCause( ncl ); - throw e2; - } catch (ArrayStoreException e ) { // Framework error diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java index e62f41ebedfd..25b0da6fd550 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java @@ -196,14 +196,6 @@ class ScriptImpl implements XScript metaData.getLanguageName(), metaData.getLanguage(), ScriptFrameworkErrorType.MALFORMED_URL ); } - catch ( com.sun.star.script.framework.provider.NoSuitableClassLoaderException nsc ) - { - // Framework error - throw new ScriptFrameworkErrorException( - nsc.getMessage(), null, - metaData.getLanguageName(), metaData.getLanguage(), - ScriptFrameworkErrorType.UNKNOWN ); - } Context ctxt = null; try |