[KARAF-4745] MBean may loose all information when throwing exceptions Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/0885f0a6 Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0885f0a6 Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0885f0a6
Branch: refs/heads/master Commit: 0885f0a658f7ade2e9e3224ea36d0ea7519e80f1 Parents: de47c16 Author: Guillaume Nodet <[email protected]> Authored: Mon Oct 3 15:34:10 2016 +0200 Committer: Guillaume Nodet <[email protected]> Committed: Mon Oct 3 15:34:10 2016 +0200 ---------------------------------------------------------------------- .../bundle/core/internal/BundlesMBeanImpl.java | 26 +++++++++--------- .../karaf/config/core/impl/ConfigMBeanImpl.java | 18 ++++++------- .../karaf/http/core/internal/HttpMBeanImpl.java | 2 +- .../core/internal/InstancesMBeanImpl.java | 28 ++++++++++---------- .../karaf/jdbc/internal/JdbcMBeanImpl.java | 14 +++++----- .../karaf/kar/internal/KarsMBeanImpl.java | 6 ++--- .../karaf/obr/core/internal/ObrMBeanImpl.java | 10 +++---- .../internal/ScrServiceMBeanImpl.java | 2 +- .../core/internal/ServicesMBeanImpl.java | 8 +++--- .../management/internal/SystemMBeanImpl.java | 18 ++++++------- .../web/management/internal/WebMBeanImpl.java | 10 +++---- .../management/internal/WrapperMBeanImpl.java | 6 ++--- 12 files changed, 74 insertions(+), 74 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundlesMBeanImpl.java ---------------------------------------------------------------------- diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundlesMBeanImpl.java b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundlesMBeanImpl.java index ba710dc..43dff42 100644 --- a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundlesMBeanImpl.java +++ b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundlesMBeanImpl.java @@ -91,7 +91,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { } return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -105,7 +105,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { return getBundleStartLevel(bundles.get(0)).getStartLevel(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -117,7 +117,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { getBundleStartLevel(bundle).setStartLevel(bundleStartLevel); } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -138,7 +138,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { getFrameworkWiring().refreshBundles(bundles); } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -164,7 +164,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { InputStream is = new URL(location).openStream(); bundles.get(0).update(is); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -177,7 +177,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { List<Bundle> bundles = selectBundles(bundleId); getFrameworkWiring().resolveBundles(bundles); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -194,7 +194,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { bundle.start(); } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -210,7 +210,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { } return bundle.getBundleId(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -222,7 +222,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { bundle.start(); } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -234,7 +234,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { bundle.stop(); } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -246,7 +246,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { bundle.uninstall(); } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -282,7 +282,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -300,7 +300,7 @@ public class BundlesMBeanImpl extends StandardMBean implements BundlesMBean { try { return bundleService.getStatus(bundleId); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java ---------------------------------------------------------------------- diff --git a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java index cc30538..8f3a582 100644 --- a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java +++ b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java @@ -72,7 +72,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { } return pids; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -81,7 +81,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { try { configRepo.update(pid, new Hashtable()); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -89,7 +89,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { try { this.configRepo.delete(pid); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -106,7 +106,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { } return propertiesMap; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -117,7 +117,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { dictionary.remove(key); configRepo.update(pid, dictionary); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -135,7 +135,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { } configRepo.update(pid, dictionary); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -146,7 +146,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { dictionary.put(key, value); configRepo.update(pid, dictionary); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -159,7 +159,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { } return null; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -171,7 +171,7 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean { Dictionary<String, String> dictionary = toDictionary(properties); configRepo.update(pid, dictionary); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/http/src/main/java/org/apache/karaf/http/core/internal/HttpMBeanImpl.java ---------------------------------------------------------------------- diff --git a/http/src/main/java/org/apache/karaf/http/core/internal/HttpMBeanImpl.java b/http/src/main/java/org/apache/karaf/http/core/internal/HttpMBeanImpl.java index f6c0ef5..f290aef 100644 --- a/http/src/main/java/org/apache/karaf/http/core/internal/HttpMBeanImpl.java +++ b/http/src/main/java/org/apache/karaf/http/core/internal/HttpMBeanImpl.java @@ -65,7 +65,7 @@ public class HttpMBeanImpl extends StandardMBean implements HttpMBean { } return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/instance/src/main/java/org/apache/karaf/instance/core/internal/InstancesMBeanImpl.java ---------------------------------------------------------------------- diff --git a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstancesMBeanImpl.java b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstancesMBeanImpl.java index f7006fd..378d332 100644 --- a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstancesMBeanImpl.java +++ b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstancesMBeanImpl.java @@ -73,7 +73,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean return -1; } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -81,7 +81,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).changeSshPort(port); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -89,7 +89,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).changeSshHost(host); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -97,7 +97,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).changeRmiRegistryPort(port); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -105,7 +105,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).changeRmiServerPort(port); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -113,7 +113,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).changeJavaOpts(javaOpts); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -121,7 +121,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).destroy(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -129,7 +129,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).start(null); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -137,7 +137,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).start(opts); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -169,7 +169,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean child.start(opts); } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -177,7 +177,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { getExistingInstance(name).stop(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -185,7 +185,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { instanceService.renameInstance(originalName, newName, false); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -193,7 +193,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean try { instanceService.renameInstance(originalName, newName, verbose); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -210,7 +210,7 @@ public class InstancesMBeanImpl extends StandardMBean implements InstancesMBean instanceService.cloneInstance(name, cloneName, settings, false); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/jdbc/src/main/java/org/apache/karaf/jdbc/internal/JdbcMBeanImpl.java ---------------------------------------------------------------------- diff --git a/jdbc/src/main/java/org/apache/karaf/jdbc/internal/JdbcMBeanImpl.java b/jdbc/src/main/java/org/apache/karaf/jdbc/internal/JdbcMBeanImpl.java index 90edf67..630106c 100644 --- a/jdbc/src/main/java/org/apache/karaf/jdbc/internal/JdbcMBeanImpl.java +++ b/jdbc/src/main/java/org/apache/karaf/jdbc/internal/JdbcMBeanImpl.java @@ -59,7 +59,7 @@ public class JdbcMBeanImpl implements JdbcMBean { } return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -68,7 +68,7 @@ public class JdbcMBeanImpl implements JdbcMBean { try { jdbcService.create(name, driverName, driverClass, databaseName, url, user, password, databaseType); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -77,7 +77,7 @@ public class JdbcMBeanImpl implements JdbcMBean { try { jdbcService.delete(name); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -86,7 +86,7 @@ public class JdbcMBeanImpl implements JdbcMBean { try { return jdbcService.info(datasource); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -120,7 +120,7 @@ public class JdbcMBeanImpl implements JdbcMBean { return table; } catch (Exception e) { e.printStackTrace(); - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -129,7 +129,7 @@ public class JdbcMBeanImpl implements JdbcMBean { try { jdbcService.execute(datasource, command); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -162,7 +162,7 @@ public class JdbcMBeanImpl implements JdbcMBean { return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/kar/src/main/java/org/apache/karaf/kar/internal/KarsMBeanImpl.java ---------------------------------------------------------------------- diff --git a/kar/src/main/java/org/apache/karaf/kar/internal/KarsMBeanImpl.java b/kar/src/main/java/org/apache/karaf/kar/internal/KarsMBeanImpl.java index b274e21..9cee12b 100644 --- a/kar/src/main/java/org/apache/karaf/kar/internal/KarsMBeanImpl.java +++ b/kar/src/main/java/org/apache/karaf/kar/internal/KarsMBeanImpl.java @@ -37,7 +37,7 @@ public class KarsMBeanImpl extends StandardMBean implements KarsMBean { try { return karService.list(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -49,7 +49,7 @@ public class KarsMBeanImpl extends StandardMBean implements KarsMBean { try { karService.install(new URI(url)); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -57,7 +57,7 @@ public class KarsMBeanImpl extends StandardMBean implements KarsMBean { try { karService.uninstall(name); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/obr/src/main/java/org/apache/karaf/obr/core/internal/ObrMBeanImpl.java ---------------------------------------------------------------------- diff --git a/obr/src/main/java/org/apache/karaf/obr/core/internal/ObrMBeanImpl.java b/obr/src/main/java/org/apache/karaf/obr/core/internal/ObrMBeanImpl.java index c182165..4dbb599 100644 --- a/obr/src/main/java/org/apache/karaf/obr/core/internal/ObrMBeanImpl.java +++ b/obr/src/main/java/org/apache/karaf/obr/core/internal/ObrMBeanImpl.java @@ -90,7 +90,7 @@ public class ObrMBeanImpl extends StandardMBean implements ObrMBean { return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -98,7 +98,7 @@ public class ObrMBeanImpl extends StandardMBean implements ObrMBean { try { repositoryAdmin.addRepository(url); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -110,7 +110,7 @@ public class ObrMBeanImpl extends StandardMBean implements ObrMBean { try { repositoryAdmin.addRepository(url); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -118,7 +118,7 @@ public class ObrMBeanImpl extends StandardMBean implements ObrMBean { try { deployBundle(bundle, false, false); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -142,7 +142,7 @@ public class ObrMBeanImpl extends StandardMBean implements ObrMBean { } } } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java ---------------------------------------------------------------------- diff --git a/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java b/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java index 13ce9f8..cffe7ac 100644 --- a/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java +++ b/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java @@ -130,7 +130,7 @@ public class ScrServiceMBeanImpl extends StandardMBean implements ScrServiceMBea try { return (componentState(componentName) == Component.STATE_ACTIVE) ? true : false; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/service/core/src/main/java/org/apache/karaf/service/core/internal/ServicesMBeanImpl.java ---------------------------------------------------------------------- diff --git a/service/core/src/main/java/org/apache/karaf/service/core/internal/ServicesMBeanImpl.java b/service/core/src/main/java/org/apache/karaf/service/core/internal/ServicesMBeanImpl.java index b0ddf02..97ea0aa 100644 --- a/service/core/src/main/java/org/apache/karaf/service/core/internal/ServicesMBeanImpl.java +++ b/service/core/src/main/java/org/apache/karaf/service/core/internal/ServicesMBeanImpl.java @@ -52,7 +52,7 @@ public class ServicesMBeanImpl extends StandardMBean implements ServicesMBean { try { return getServices(-1, false); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -60,7 +60,7 @@ public class ServicesMBeanImpl extends StandardMBean implements ServicesMBean { try { return getServices(-1, inUse); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -68,7 +68,7 @@ public class ServicesMBeanImpl extends StandardMBean implements ServicesMBean { try { return getServices(bundleId, false); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -115,7 +115,7 @@ public class ServicesMBeanImpl extends StandardMBean implements ServicesMBean { } return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/system/src/main/java/org/apache/karaf/system/management/internal/SystemMBeanImpl.java ---------------------------------------------------------------------- diff --git a/system/src/main/java/org/apache/karaf/system/management/internal/SystemMBeanImpl.java b/system/src/main/java/org/apache/karaf/system/management/internal/SystemMBeanImpl.java index c0f34cd..5145bf1 100644 --- a/system/src/main/java/org/apache/karaf/system/management/internal/SystemMBeanImpl.java +++ b/system/src/main/java/org/apache/karaf/system/management/internal/SystemMBeanImpl.java @@ -58,7 +58,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { systemService.halt(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -66,7 +66,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { systemService.halt(time); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -74,7 +74,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { systemService.reboot(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -82,7 +82,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { systemService.reboot(time, SystemService.Swipe.NONE); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -90,7 +90,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { systemService.reboot(time, SystemService.Swipe.CACHE); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -98,7 +98,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { systemService.reboot(time, SystemService.Swipe.ALL); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -106,7 +106,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { systemService.setStartLevel(startLevel); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -114,7 +114,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { try { return systemService.getStartLevel(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -205,7 +205,7 @@ public class SystemMBeanImpl extends StandardMBean implements SystemMBean { return result; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/web/src/main/java/org/apache/karaf/web/management/internal/WebMBeanImpl.java ---------------------------------------------------------------------- diff --git a/web/src/main/java/org/apache/karaf/web/management/internal/WebMBeanImpl.java b/web/src/main/java/org/apache/karaf/web/management/internal/WebMBeanImpl.java index f1a81bb..dd91579 100644 --- a/web/src/main/java/org/apache/karaf/web/management/internal/WebMBeanImpl.java +++ b/web/src/main/java/org/apache/karaf/web/management/internal/WebMBeanImpl.java @@ -73,7 +73,7 @@ public class WebMBeanImpl extends StandardMBean implements WebMBean { } return table; } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -83,7 +83,7 @@ public class WebMBeanImpl extends StandardMBean implements WebMBean { list.add(bundleId); webContainerService.start(list); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -91,7 +91,7 @@ public class WebMBeanImpl extends StandardMBean implements WebMBean { try { webContainerService.start(bundleIds); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -101,7 +101,7 @@ public class WebMBeanImpl extends StandardMBean implements WebMBean { list.add(bundleId); webContainerService.stop(list); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -109,7 +109,7 @@ public class WebMBeanImpl extends StandardMBean implements WebMBean { try { webContainerService.stop(bundleIds); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } http://git-wip-us.apache.org/repos/asf/karaf/blob/0885f0a6/wrapper/src/main/java/org/apache/karaf/wrapper/management/internal/WrapperMBeanImpl.java ---------------------------------------------------------------------- diff --git a/wrapper/src/main/java/org/apache/karaf/wrapper/management/internal/WrapperMBeanImpl.java b/wrapper/src/main/java/org/apache/karaf/wrapper/management/internal/WrapperMBeanImpl.java index 9be5b8e..6f1eeda 100644 --- a/wrapper/src/main/java/org/apache/karaf/wrapper/management/internal/WrapperMBeanImpl.java +++ b/wrapper/src/main/java/org/apache/karaf/wrapper/management/internal/WrapperMBeanImpl.java @@ -47,7 +47,7 @@ public class WrapperMBeanImpl extends StandardMBean implements WrapperMBean { try { wrapperService.install(); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -55,7 +55,7 @@ public class WrapperMBeanImpl extends StandardMBean implements WrapperMBean { try { return wrapperService.install(name, displayName, description, startType); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } } @@ -63,7 +63,7 @@ public class WrapperMBeanImpl extends StandardMBean implements WrapperMBean { try { return wrapperService.install(name, displayName, description, startType, envs, includes); } catch (Exception e) { - throw new MBeanException(null, e.getMessage()); + throw new MBeanException(null, e.toString()); } }
