Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 244624 - Implement new BundleException types
Summary: Implement new BundleException types
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M2   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 247354
  Show dependency tree
 
Reported: 2008-08-19 17:18 EDT by Thomas Watson CLA
Modified: 2009-05-18 17:13 EDT (History)
1 user (show)

See Also:


Attachments
patch + testcases (88.11 KB, patch)
2008-08-25 17:52 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2008-08-19 17:18:04 EDT
The BundleException class has been enhanced to allow for error code types to be specified.  The following error codes have been defined (see the latest javadoc for explaination):

UNSPECIFIED
UNSUPPORTED_OPERATION
INVALID_OPERATION
MANIFEST_ERROR
RESOLVE_ERROR
ACTIVATOR_ERROR
SECURITY_ERROR
STATECHANGE_ERROR
NATIVECODE_ERROR
DUPLICATE_BUNDLE_ERROR

The Framework needs to be updated to use the appropriate type when creating BundleExceptions.
Comment 1 Thomas Watson CLA 2008-08-25 17:52:54 EDT
Created attachment 110850 [details]
patch + testcases

I scanned the equinox code and added BundleException types where I thought it was appropriate.  I also added a few testcases.  The tests are not complete by any means but at least do a fair job at sniff testing the changes.
Comment 2 Thomas Watson CLA 2008-08-25 18:12:02 EDT
Patch released to HEAD.
Comment 3 Rafael Chaves CLA 2009-05-18 15:42:46 EDT
Hi Tom, quick question: it seems the osgi.jar inside supplemental was not updated accordingly. If the supplemental project were going to be compiled against the bundled osgi.jar (not sure it was the intention), it will fail because the source code refers to a constant in BundleException that does not exist in the osgi.jar.
Comment 4 Thomas Watson CLA 2009-05-18 17:11:21 EDT
(In reply to comment #3)
> Hi Tom, quick question: it seems the osgi.jar inside supplemental was not
> updated accordingly. If the supplemental project were going to be compiled
> against the bundled osgi.jar (not sure it was the intention), it will fail
> because the source code refers to a constant in BundleException that does not
> exist in the osgi.jar.
> 

which osgi.jar?  The one from the OSGi R4 V4.1 specification?  The supplemental project must be compiled against the upcoming osgi.jar from the OSGi R4 V4.2 specification.  It will no longer be able to compile against the V4.1 osgi.jar.
Comment 5 Thomas Watson CLA 2009-05-18 17:13:57 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > Hi Tom, quick question: it seems the osgi.jar inside supplemental was not
> > updated accordingly. If the supplemental project were going to be compiled
> > against the bundled osgi.jar (not sure it was the intention), it will fail
> > because the source code refers to a constant in BundleException that does not
> > exist in the osgi.jar.
> > 
> 
> which osgi.jar?  The one from the OSGi R4 V4.1 specification?  The supplemental
> project must be compiled against the upcoming osgi.jar from the OSGi R4 V4.2
> specification.  It will no longer be able to compile against the V4.1 osgi.jar.
> 

Sorry, you explicitly told me the one under the supplemental project. :)  This jar does not belong here.  It is not used in the compilation of the supplement project.  I will need to remove that jar.