From d1d2d3296b9f98a5144022612d03f6cb419164e5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 6 Aug 2014 09:01:06 +0200 Subject: java: remove exceptions from throws clauses that are not actually thrown Change-Id: I9d0f9242c911d9dd05f2229da44a2e8305b3df6a --- odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java | 2 +- odk/examples/DevelopersGuide/Forms/ControlLock.java | 2 +- odk/examples/DevelopersGuide/Forms/FLTools.java | 2 +- odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java | 2 +- sfx2/qa/complex/sfx2/DocumentEvents.java | 2 +- sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java | 2 +- sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java | 1 - 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java b/odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java index 8bd28f78ef68..1fd4db3600b7 100644 --- a/odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java +++ b/odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java @@ -55,7 +55,7 @@ class ComponentTreeTraversal implements IFormComponentAction control model or a FormComponents instance.

*/ - protected boolean shouldStepInto( XIndexContainer xContainer ) throws com.sun.star.uno.Exception + protected boolean shouldStepInto( XIndexContainer xContainer ) { // step down the tree, if possible XServiceInfo xSI = UNO.queryServiceInfo( xContainer ); diff --git a/odk/examples/DevelopersGuide/Forms/ControlLock.java b/odk/examples/DevelopersGuide/Forms/ControlLock.java index b917039bf242..a8d93b1b8980 100644 --- a/odk/examples/DevelopersGuide/Forms/ControlLock.java +++ b/odk/examples/DevelopersGuide/Forms/ControlLock.java @@ -61,7 +61,7 @@ class LockControlModels extends ComponentTreeTraversal /* ------------------------------------------------------------------ */ @Override - protected boolean shouldStepInto( XIndexContainer xContainer ) throws com.sun.star.uno.Exception + protected boolean shouldStepInto( XIndexContainer xContainer ) { if ( !super.shouldStepInto( xContainer ) ) return false; // don't try to be more clever than our base class diff --git a/odk/examples/DevelopersGuide/Forms/FLTools.java b/odk/examples/DevelopersGuide/Forms/FLTools.java index 4e673519a606..7759175fd7e8 100644 --- a/odk/examples/DevelopersGuide/Forms/FLTools.java +++ b/odk/examples/DevelopersGuide/Forms/FLTools.java @@ -76,7 +76,7 @@ public class FLTools /* ------------------------------------------------------------------ */ /** returns the name of the given form component */ - public static String getName( Object aFormComponent ) throws com.sun.star.uno.Exception + public static String getName( Object aFormComponent ) { XNamed xNamed = UnoRuntime.queryInterface( XNamed.class, aFormComponent ); diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java index 1016f49ca970..9596b01ea9a8 100644 --- a/odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java +++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java @@ -33,7 +33,7 @@ public class SpreadsheetDocument extends DocumentHelper super( xCtx, implCreateBlankDocument( xCtx, "private:factory/scalc" ) ); } - public SpreadsheetDocument( XComponentContext xCtx, XComponent document ) throws com.sun.star.uno.Exception + public SpreadsheetDocument( XComponentContext xCtx, XComponent document ) { super( xCtx, document ); } diff --git a/sfx2/qa/complex/sfx2/DocumentEvents.java b/sfx2/qa/complex/sfx2/DocumentEvents.java index f6978a5bd87e..8f657d62e673 100644 --- a/sfx2/qa/complex/sfx2/DocumentEvents.java +++ b/sfx2/qa/complex/sfx2/DocumentEvents.java @@ -105,7 +105,7 @@ public class DocumentEvents extends JUnitBasedTest } //@Test - public void testCloseByAPI() throws Exception + public void testCloseByAPI() { impl_setupDocCloseTest(); // closing the doc by API is synchronous, so do this in a separate thread, else we will get a deadlock diff --git a/sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java b/sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java index 75981d7a66d0..7d2b22975671 100644 --- a/sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java +++ b/sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java @@ -47,7 +47,7 @@ import static org.junit.Assert.*; public class ChartDocumentTest implements DocumentTest { - public ChartDocumentTest( final XMultiServiceFactory i_orb ) throws com.sun.star.uno.Exception, InterruptedException + public ChartDocumentTest( final XMultiServiceFactory i_orb ) throws com.sun.star.uno.Exception { m_textDocument = OfficeDocument.blankDocument( i_orb, DocumentType.WRITER ); diff --git a/sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java b/sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java index 12f6283edece..67dbb17295d1 100644 --- a/sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java +++ b/sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java @@ -165,7 +165,6 @@ public abstract class DrawingOrPresentationDocumentTest extends DocumentTestBase * verifies the given shape has the given size */ private void verifyShapeGeometry( final Object i_shapeObject, final int i_expectedWidth, final int i_expectedHeight ) - throws com.sun.star.uno.Exception { final XShape shape = UnoRuntime.queryInterface( XShape.class, i_shapeObject ); final Size shapeSize = shape.getSize(); -- cgit