summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-05 15:29:21 +0200
committerNoel Grandin <noel@peralex.com>2014-08-08 09:48:20 +0200
commit616b3ad50404f35d84708b3feeb8c66f2f23f1b1 (patch)
treefbff023a34b3cc62b2c5beb592b95e65ce28251b /odk
parentb6a83e99c8f4442c3c96198ac816dcb99419a67e (diff)
java: remove exceptions from throws clauses that are not
.. actually thrown Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartInDraw.java3
-rw-r--r--odk/examples/DevelopersGuide/Database/CodeSamples.java2
-rw-r--r--odk/examples/DevelopersGuide/Database/sdbcx.java12
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java12
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java9
5 files changed, 17 insertions, 21 deletions
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
index ae1bd973f8be..eff07574eeb0 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
@@ -201,8 +201,7 @@ public class ChartInDraw
public void testThreeD()
throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException,
- com.sun.star.lang.IndexOutOfBoundsException
+ com.sun.star.lang.IllegalArgumentException, WrappedTargetException
{
XPropertySet aDiaProp = UnoRuntime.queryInterface( XPropertySet.class, maDiagram );
Boolean aTrue = new Boolean( true );
diff --git a/odk/examples/DevelopersGuide/Database/CodeSamples.java b/odk/examples/DevelopersGuide/Database/CodeSamples.java
index 58458c6f1535..d714aadfce57 100644
--- a/odk/examples/DevelopersGuide/Database/CodeSamples.java
+++ b/odk/examples/DevelopersGuide/Database/CodeSamples.java
@@ -113,7 +113,7 @@ public class CodeSamples
}
// check if the connection is not null aand dispose it later on.
- public static void checkConnection(XConnection con) throws com.sun.star.uno.Exception
+ public static void checkConnection(XConnection con)
{
if(con != null)
{
diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java
index ebffb80dfc7e..4f73c8bb8286 100644
--- a/odk/examples/DevelopersGuide/Database/sdbcx.java
+++ b/odk/examples/DevelopersGuide/Database/sdbcx.java
@@ -176,7 +176,7 @@ public class sdbcx
// 15. example
// print all columns of a XColumnsSupplier
- public static void printColumns(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException
+ public static void printColumns(XColumnsSupplier xColumnsSup)
{
System.out.println("Example printColumns");
// the table must be at least support a XColumnsSupplier interface
@@ -190,7 +190,7 @@ public class sdbcx
// 16. example
// print all keys inclusive the columns of a key
- public static void printKeys(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException
+ public static void printKeys(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception
{
System.out.println("Example printKeys");
XKeysSupplier xKeysSup = UnoRuntime.queryInterface(XKeysSupplier.class,xColumnsSup);
@@ -212,7 +212,7 @@ public class sdbcx
// 17. example
// print all keys inclusive the columns of a key
- public static void printIndexes(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException
+ public static void printIndexes(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception
{
System.out.println("Example printIndexes");
XIndexesSupplier xIndexesSup = UnoRuntime.queryInterface(XIndexesSupplier.class,xColumnsSup);
@@ -235,7 +235,7 @@ public class sdbcx
// 18. example
// column properties
- public static void printColumnProperties(Object column) throws com.sun.star.uno.Exception,SQLException
+ public static void printColumnProperties(Object column) throws com.sun.star.uno.Exception
{
System.out.println("Example printColumnProperties");
XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,column);
@@ -260,7 +260,7 @@ public class sdbcx
// 19. example
// index properties
- public static void printIndexProperties(Object index) throws com.sun.star.uno.Exception,SQLException
+ public static void printIndexProperties(Object index) throws com.sun.star.uno.Exception
{
System.out.println("Example printIndexProperties");
XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,index);
@@ -275,7 +275,7 @@ public class sdbcx
// 20. example
// key properties
- public static void printKeyProperties(Object key) throws com.sun.star.uno.Exception,SQLException
+ public static void printKeyProperties(Object key) throws com.sun.star.uno.Exception
{
System.out.println("Example printKeyProperties");
XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,key);
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index 10bdcc37f2b8..07fa1106086f 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -270,7 +270,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
- public short executeDialogWithembeddedExampleSnippets() throws com.sun.star.script.BasicErrorException {
+ public short executeDialogWithembeddedExampleSnippets() {
if (m_xWindowPeer == null){
createWindowPeer();
}
@@ -282,7 +282,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
}
- public short executeDialog() throws com.sun.star.script.BasicErrorException {
+ public short executeDialog() {
if (m_xWindowPeer == null) {
createWindowPeer();
}
@@ -299,7 +299,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
}
- public void initialize(String[] PropertyNames, Object[] PropertyValues) throws com.sun.star.script.BasicErrorException{
+ public void initialize(String[] PropertyNames, Object[] PropertyValues) {
try{
XMultiPropertySet xMultiPropertySet = UnoRuntime.queryInterface(XMultiPropertySet.class, m_xDlgModelNameContainer);
xMultiPropertySet.setPropertyValues(PropertyNames, PropertyValues);
@@ -317,7 +317,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
* @return
* @throws java.lang.Exception
*/
- public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) throws com.sun.star.script.BasicErrorException{
+ public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) {
try{
if (_xWindowParentPeer == null){
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer);
@@ -357,7 +357,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
* @return
* @throws java.lang.Exception
*/
- public XWindowPeer createWindowPeer() throws com.sun.star.script.BasicErrorException{
+ public XWindowPeer createWindowPeer() {
return createWindowPeer(null);
}
@@ -366,7 +366,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
}
- public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) throws com.sun.star.script.BasicErrorException{
+ public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) {
try {
Object oControlModel = m_xMSFDialogModel.createInstance(ServiceName);
XMultiPropertySet xControlMultiPropertySet = UnoRuntime.queryInterface(XMultiPropertySet.class, oControlModel);
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
index da90531248b2..63b13da77fa2 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
@@ -122,8 +122,7 @@ public class LinguisticExamples
/** Get the SpellChecker to be used.
*/
public boolean GetSpell()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
+ throws com.sun.star.uno.RuntimeException
{
if (mxLinguSvcMgr != null)
mxSpell = mxLinguSvcMgr.getSpellChecker();
@@ -133,8 +132,7 @@ public class LinguisticExamples
/** Get the Hyphenator to be used.
*/
public boolean GetHyph()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
+ throws com.sun.star.uno.RuntimeException
{
if (mxLinguSvcMgr != null)
mxHyph = mxLinguSvcMgr.getHyphenator();
@@ -144,8 +142,7 @@ public class LinguisticExamples
/** Get the Thesaurus to be used.
*/
public boolean GetThes()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
+ throws com.sun.star.uno.RuntimeException
{
if (mxLinguSvcMgr != null)
mxThes = mxLinguSvcMgr.getThesaurus();