java: remove exceptions from throws clauses that are not

.. actually thrown

Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
This commit is contained in:
Noel Grandin
2014-08-05 15:29:21 +02:00
parent b6a83e99c8
commit 616b3ad504
85 changed files with 195 additions and 451 deletions

View File

@@ -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>

View File

@@ -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
{

View File

@@ -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;

View File

@@ -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();

View File

@@ -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);

View File

@@ -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

View File

@@ -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