You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by aw...@apache.org on 2010/02/27 01:06:04 UTC
svn commit: r916876 - in
/incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx:
framework/Framework.java useradmin/UserAdmin.java
Author: awojtuniak
Date: Sat Feb 27 00:06:04 2010
New Revision: 916876
URL: http://svn.apache.org/viewvc?rev=916876&view=rev
Log:
ARIES-179
Modified:
incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/framework/Framework.java
incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/useradmin/UserAdmin.java
Modified: incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/framework/Framework.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/framework/Framework.java?rev=916876&r1=916875&r2=916876&view=diff
==============================================================================
--- incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/framework/Framework.java (original)
+++ incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/framework/Framework.java Sat Feb 27 00:06:04 2010
@@ -81,7 +81,9 @@
Bundle bundle = context.installBundle(location);
return bundle.getBundleId();
} catch (BundleException e) {
- throw new IOException("Can't install bundle with location " + location, e);
+ IOException ioex = new IOException("Can't install bundle with location " + location);
+ ioex.initCause(e);
+ throw ioex;
}
}
@@ -102,7 +104,9 @@
}
}
- throw new IOException("Can't install bundle with location " + location, e);
+ IOException ioex = new IOException("Can't install bundle with location " + location);
+ ioex.initCause(e);
+ throw ioex;
}
}
@@ -142,7 +146,7 @@
return new BatchInstallResult("Failed to install bundles arguments can't be null").toCompositeData();
}
- if(locations != null && locations.length != urls.length){
+ if(locations.length != urls.length){
return new BatchInstallResult("Failed to install bundles size of arguments should be same").toCompositeData();
}
long[] ids = new long[locations.length];
@@ -218,7 +222,9 @@
try {
bundle.update();
} catch (BundleException be) {
- throw new IOException("Failed to restart framework", be);
+ IOException ioex = new IOException("Failed to restart framework");
+ ioex.initCause(be);
+ throw ioex;
}
}
@@ -275,7 +281,9 @@
try {
bundle.stop();
} catch (BundleException be) {
- throw new IOException("Failed to shutdown framework", be);
+ IOException ioex = new IOException("Failed to shutdown framework");
+ ioex.initCause(be);
+ throw ioex;
}
}
@@ -289,7 +297,9 @@
try {
bundle.start();
} catch (BundleException be) {
- throw new IOException("Failed to start bundle with id " + bundleIdentifier, be);
+ IOException ioex = new IOException("Failed to start bundle with id " + bundleIdentifier);
+ ioex.initCause(be);
+ throw ioex;
}
}
}
@@ -320,7 +330,9 @@
try {
bundle.stop();
} catch (BundleException e) {
- throw new IOException("Failed to stop bundle with id " + bundleIdentifier, e);
+ IOException ioex = new IOException("Failed to stop bundle with id " + bundleIdentifier);
+ ioex.initCause(e);
+ throw ioex;
}
}
}
@@ -351,7 +363,9 @@
try {
bundle.uninstall();
} catch (BundleException be) {
- throw new IOException("Failed to uninstall bundle with id " + bundleIdentifier, be);
+ IOException ioex = new IOException("Failed to uninstall bundle with id " + bundleIdentifier);
+ ioex.initCause(be);
+ throw ioex;
}
}
@@ -383,7 +397,9 @@
try {
bundle.update();
} catch (BundleException be) {
- throw new IOException("Failed to update bundle with id " + bundleIdentifier, be);
+ IOException ioex = new IOException("Failed to update bundle with id " + bundleIdentifier);
+ ioex.initCause(be);
+ throw ioex;
}
}
@@ -405,7 +421,9 @@
}
}
- throw new IOException("Can't update system bundle", be);
+ IOException ioex = new IOException("Can't update system bundle");
+ ioex.initCause(be);
+ throw ioex;
}
}
@@ -456,7 +474,9 @@
try {
bundle.update();
} catch (BundleException be) {
- throw new IOException("Failed to update system bundle", be);
+ IOException ioex = new IOException("Failed to update system bundle");
+ ioex.initCause(be);
+ throw ioex;
}
}
Modified: incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/useradmin/UserAdmin.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/useradmin/UserAdmin.java?rev=916876&r1=916875&r2=916876&view=diff
==============================================================================
--- incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/useradmin/UserAdmin.java (original)
+++ incubator/aries/trunk/jmx/jmx-core/src/main/java/org/apache/aries/jmx/useradmin/UserAdmin.java Sat Feb 27 00:06:04 2010
@@ -255,7 +255,9 @@
try {
roles = userAdmin.getRoles(filter);
} catch (InvalidSyntaxException ise) {
- throw new IOException("Operation fails illegal filter provided: " + filter, ise);
+ IOException ioex = new IOException("Operation fails illegal filter provided: " + filter);
+ ioex.initCause(ise);
+ throw ioex;
}
if (roles == null) {
@@ -358,7 +360,9 @@
try {
roles = userAdmin.getRoles(filter);
} catch (InvalidSyntaxException ise) {
- throw new IOException("Operation fails illegal filter provided: " + filter, ise);
+ IOException ioex = new IOException("Operation fails illegal filter provided: " + filter);
+ ioex.initCause(ise);
+ throw ioex;
}
if (roles == null) {
return null;
@@ -397,7 +401,9 @@
try {
roles = userAdmin.getRoles(filter);
} catch (InvalidSyntaxException ise) {
- throw new IOException("Operation fails illegal filter provided: " + filter, ise);
+ IOException ioex = new IOException("Operation fails illegal filter provided: " + filter);
+ ioex.initCause(ise);
+ throw ioex;
}
if (roles == null) {
return null;