Skip to content

Commit

Permalink
[JBOSGI-439] Rollback and fix as discussed on forum
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Diesler committed May 3, 2011
1 parent 5a1f14f commit eac5f31
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,7 @@ boolean ensureResolved(boolean fireEvent) {
if (fireEvent == true) {
FrameworkEventsPlugin eventsPlugin = getFrameworkState().getFrameworkEventsPlugin();
eventsPlugin.fireFrameworkEvent(this, FrameworkEvent.ERROR, ex);
} else {
// Make sure the reason for not resolving doesn't get lost, so log it.
log.errorf(ex, "Could not resolve bundle: %s", this);
}

return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ List<FragmentBundleRevision> getAttachedFragments() {
Class<?> loadClass(String className) throws ClassNotFoundException {

// If this bundle's state is INSTALLED, this method must attempt to resolve this bundle
if (getBundleState().ensureResolved(false) == false)
if (getBundleState().ensureResolved(true) == false)
throw new ClassNotFoundException("Class '" + className + "' not found in: " + this);

// Load the class through the module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void startInternal(int options) throws BundleException {

// #4 If this bundle's state is not RESOLVED, an attempt is made to resolve this bundle.
// If the Framework cannot resolve this bundle, a BundleException is thrown.
if (ensureResolved(false) == false)
if (ensureResolved(true) == false)
throw new BundleException("Cannot resolve bundle: " + this);

// The BundleContext object is valid during STARTING, STOPPING, and ACTIVE
Expand Down

0 comments on commit eac5f31

Please sign in to comment.