As a API design convention, The OSGi API does not declare unchecked 
exceptions in the API. They are just documented in the @throws javadoc 
tag. As required by the Java language, all checked exception are declared 
in the API.

See item 62 in Effective Java, 2nd Edition.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]

office: +1 386 848 1781
mobile: +1 386 848 3788





From:   <[email protected]>
To:     <[email protected]>
Date:   2010/09/13 13:32
Subject:        [osgi-dev] org.osgi.framework.BundleContext has many 
javadoc @throws tags but missing most "throws" clauses
Sent by:        [email protected]



org.osgi.framework.BundleContext has javadoc containing many @throws tags. 
 however most of the interfaces are missing the corresponding throw 
clauses.

the fact that some of the function interfaces have some (but in some cases 
not all) such thrown exceptions identified indicates that there probably 
is not a policy governing this.

having all throws clauses included could help identify at compile time 
instances in callers that either need to handle or need to report they 
will throw these exceptions.

find attached a simple patch that creates "throws" clauses from all 
"@throws" tags found in BundleContext.

++ kirk beitz : nokia : austin + san diego : [email protected] ++

[attachment "BundleContext.throws.patch" deleted by BJ 
Hargrave/Austin/IBM] [attachment "ATT00001..htm" deleted by BJ 
Hargrave/Austin/IBM] _______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to