summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Campo2008-01-22 05:38:56 (EST)
committerChristian Campo2008-01-22 05:38:56 (EST)
commitf6ac49e3d513f2fae8613d6cf0e039794f2f700b (patch)
treeb77373954629cc83ee214728984b73adb646fc40
parent514f632b7be239cb56a7893b71073ef606a2d6e7 (diff)
downloadorg.eclipse.riena-f6ac49e3d513f2fae8613d6cf0e039794f2f700b.zip
org.eclipse.riena-f6ac49e3d513f2fae8613d6cf0e039794f2f700b.tar.gz
org.eclipse.riena-f6ac49e3d513f2fae8613d6cf0e039794f2f700b.tar.bz2
throw exceptions if bundles cannot be started althoug required because they are only resolved
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java b/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java
index 740aa4d..8b332e2 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java
@@ -52,17 +52,15 @@ public class RienaTestCase extends TestCase {
Bundle[] bundles = context.getBundles();
for (Bundle bundle : bundles) {
- if (truePat.matcher(bundle.getSymbolicName()).matches() && !(falsePat.matcher(bundle.getSymbolicName()).matches())
- && (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING) /*
- * &&
- * !(bundle
- * instanceof
- * BundleFragment)
- */) {
- bundle.start();
+ if (truePat.matcher(bundle.getSymbolicName()).matches() && !(falsePat.matcher(bundle.getSymbolicName()).matches())) {
+ if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING /* STARTING==LAZY */) {
+ bundle.start();
+ } else {
+ if (bundle.getState() == Bundle.INSTALLED) {
+ throw new RuntimeException("can't start required bundle because it is not RESOLVED but only INSTALLED : " + bundle.getSymbolicName());
+ }
+ }
}
}
-
}
-
}