Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2010-02-08 10:22:19 -0500
committerThomas Watson2010-02-08 10:22:19 -0500
commitc3a719727e7bbe5ebd30654f9e187713cfad0393 (patch)
tree93f9d56ccf33e155910f7f92a9859e279300488a
parent030cd00210a0f6142b353367f777bb576babe8c4 (diff)
downloadrt.equinox.framework-c3a719727e7bbe5ebd30654f9e187713cfad0393.tar.gz
rt.equinox.framework-c3a719727e7bbe5ebd30654f9e187713cfad0393.tar.xz
rt.equinox.framework-c3a719727e7bbe5ebd30654f9e187713cfad0393.zip
Bug 302011 - Should provide causing exception where possible
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java6
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java6
2 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
index 871132649..a4d3d18ec 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
@@ -385,9 +385,9 @@ class StateBuilder {
} catch (ClassNotFoundException e) {
// oh well cannot support; just use string
putValue = value;
- } catch (Exception e) { // got some reflection exception
- if (e instanceof RuntimeException)
- throw (RuntimeException) e;
+ } catch (RuntimeException e) { // got some reflection exception
+ throw e;
+ } catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
else if (ATTR_TYPE_VERSION.equals(type))
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
index 148063b65..c27993808 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
@@ -418,9 +418,9 @@ final class StateReader {
value = constructor.newInstance(new Object[] {value});
} catch (ClassNotFoundException e) {
// oh well cannot support; just use the string
- } catch (Exception e) { // got some reflection exception
- if (e instanceof RuntimeException)
- throw (RuntimeException) e;
+ } catch (RuntimeException e) { // got some reflection exception
+ throw e;
+ } catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}

Back to the top