[Libreoffice-commits] core.git: jurt/com
Robert Antoni Buj i Gelonch
robert.buj at gmail.com
Thu Oct 9 23:19:08 PDT 2014
jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java | 5 ---
jurt/com/sun/star/comp/loader/JavaLoader.java | 20 ++------------
jurt/com/sun/star/comp/servicemanager/ServiceManager.java | 6 ----
3 files changed, 6 insertions(+), 25 deletions(-)
New commits:
commit 7afbb8275667ca8157be5449536e671bbac9f988
Author: Robert Antoni Buj i Gelonch <robert.buj at gmail.com>
Date: Thu Oct 9 20:53:02 2014 +0200
jurt: use new exception constructors
Change-Id: I58e7ebdd5c48094142f93f47271bcc0cc8b97981
Reviewed-on: https://gerrit.libreoffice.org/11892
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java
index 7e370a9..7dd6fcf 100644
--- a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java
+++ b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java
@@ -124,10 +124,7 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ {
xBridge = UnoRuntime.queryInterface(XBridge.class, iBridge);
}
catch (Exception e) {
- com.sun.star.lang.IllegalArgumentException e2 =
- new com.sun.star.lang.IllegalArgumentException(e.getMessage());
- e2.initCause(e);
- throw e2;
+ throw new com.sun.star.lang.IllegalArgumentException(e, e.getMessage());
}
if(DEBUG) System.err.println("##### " + getClass().getName() + ".createBridge:" + sName + " " + sProtocol + " " + aConnection + " " + anInstanceProvider + " " + xBridge);
diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java b/jurt/com/sun/star/comp/loader/JavaLoader.java
index 7649d10..fb7c6d8 100644
--- a/jurt/com/sun/star/comp/loader/JavaLoader.java
+++ b/jurt/com/sun/star/comp/loader/JavaLoader.java
@@ -279,20 +279,11 @@ public class JavaLoader implements XImplementationLoader,
}
}
} catch (java.net.MalformedURLException e) {
- CannotActivateFactoryException cae = new CannotActivateFactoryException(
- "Can not activate factory because " + e );
- cae.initCause(e);
- throw cae;
+ throw new CannotActivateFactoryException(e, "Can not activate factory because " + e);
} catch (java.io.IOException e) {
- CannotActivateFactoryException cae = new CannotActivateFactoryException(
- "Can not activate factory because " + e );
- cae.initCause(e);
- throw cae;
+ throw new CannotActivateFactoryException(e, "Can not activate factory because " + e);
} catch (java.lang.ClassNotFoundException e) {
- CannotActivateFactoryException cae = new CannotActivateFactoryException(
- "Can not activate factory because " + e );
- cae.initCause(e);
- throw cae;
+ throw new CannotActivateFactoryException(e, "Can not activate factory because " + e);
}
Class<?>[] paramTypes = {String.class, XMultiServiceFactory.class, XRegistryKey.class};
@@ -400,10 +391,7 @@ public class JavaLoader implements XImplementationLoader,
if ( (oRet != null) && (oRet instanceof Boolean) )
success = ((Boolean) oRet).booleanValue();
} catch (Exception e) {
- CannotRegisterImplementationException e2 =
- new CannotRegisterImplementationException(e.toString());
- e2.initCause(e);
- throw e2;
+ throw new CannotRegisterImplementationException(e, e.toString());
}
return success;
diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
index 729fda5..85f69fd 100644
--- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
+++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
@@ -652,11 +652,7 @@ public class ServiceManager implements XMultiServiceFactory,
try {
return enumeration.next();
} catch (java.util.NoSuchElementException e) {
- com.sun.star.container.NoSuchElementException ex =
- new com.sun.star.container.NoSuchElementException(
- e.toString());
- ex.initCause(e);
- throw ex;
+ throw new com.sun.star.container.NoSuchElementException(e, e.toString());
}
}
}
More information about the Libreoffice-commits
mailing list