You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ni...@apache.org on 2005/11/25 22:10:07 UTC
svn commit: r349025 - in
/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources:
./ impl/
Author: niallp
Date: Fri Nov 25 13:09:54 2005
New Revision: 349025
URL: http://svn.apache.org/viewcvs?rev=349025&view=rev
Log:
Remove declared RuntimeException's from method signatures (but leave them in the javadocs).
See commons-dev thread http://article.gmane.org/gmane.comp.jakarta.commons.devel/74775
Modified:
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/Resources.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/ResourcesFactory.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/CollectionResourcesBase.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResources.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResourcesFactory.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/PropertyResourcesFactory.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactory.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesBase.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java
jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/XMLResourcesFactory.java
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/Resources.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/Resources.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/Resources.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/Resources.java Fri Nov 25 13:09:54 2005
@@ -59,6 +59,15 @@
* {@link org.apache.commons.resources.impl.ResourcesBase} class,
* and override the necessary methods,
* to shield themselves from future changes that may occur in this interface.
+ *
+ * @see org.apache.commons.resources.impl.ResourcesBase
+ * @see org.apache.commons.resources.impl.CollectionResourcesBase
+ * @see org.apache.commons.resources.impl.JDBCResources
+ * @see org.apache.commons.resources.impl.PropertyResources
+ * @see org.apache.commons.resources.impl.ResourceBundleResources
+ * @see org.apache.commons.resources.impl.WebappPropertyResources
+ * @see org.apache.commons.resources.impl.WebappXMLResources
+ * @see org.apache.commons.resources.impl.XMLResources
*/
public interface Resources extends Serializable {
@@ -73,7 +82,7 @@
*
* @exception ResourcesException if an error occurs during initialization
*/
- public void init() throws ResourcesException;
+ public void init();
/**
@@ -84,7 +93,7 @@
*
* @exception ResourcesException if an error occurs during finalization
*/
- public void destroy() throws ResourcesException;
+ public void destroy();
// ------------------------------------------------------------- Properties
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/ResourcesFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/ResourcesFactory.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/ResourcesFactory.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/ResourcesFactory.java Fri Nov 25 13:09:54 2005
@@ -43,6 +43,15 @@
* via JavaBeans property setters on the
* {@link org.apache.commons.resources.ResourcesFactory}
* implementation class.</p>
+ *
+ * @see org.apache.commons.resources.impl.ResourcesFactoryBase
+ * @see org.apache.commons.resources.impl.JDBCResourcesFactory
+ * @see org.apache.commons.resources.impl.PropertyResourcesFactory
+ * @see org.apache.commons.resources.impl.ResourceBundleResourcesFactory
+ * @see org.apache.commons.resources.impl.WebappResourcesFactoryBase
+ * @see org.apache.commons.resources.impl.WebappPropertyResourcesFactory
+ * @see org.apache.commons.resources.impl.WebappXMLResourcesFactory
+ * @see org.apache.commons.resources.impl.XMLResourcesFactory
*/
public interface ResourcesFactory extends Serializable {
@@ -86,8 +95,7 @@
* {@link org.apache.commons.resources.Resources} instance
* of the specified logical name cannot be returned.
*/
- public Resources getResources(String name)
- throws ResourcesException;
+ public Resources getResources(String name);
/**
@@ -108,8 +116,7 @@
* {@link org.apache.commons.resources.Resources} instance
* of the specified logical name cannot be returned.
*/
- public Resources getResources(String name, String config)
- throws ResourcesException;
+ public Resources getResources(String name, String config);
/**
@@ -120,7 +127,7 @@
*
* @exception ResourcesException if an error occurs while releasing
*/
- public void release() throws ResourcesException;
+ public void release();
}
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/CollectionResourcesBase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/CollectionResourcesBase.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/CollectionResourcesBase.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/CollectionResourcesBase.java Fri Nov 25 13:09:54 2005
@@ -216,7 +216,7 @@
*
* @exception ResourcesException if an error occurs during finalization
*/
- public void destroy() throws ResourcesException {
+ public void destroy() {
synchronized (lists) {
lists.clear();
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResources.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResources.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResources.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResources.java Fri Nov 25 13:09:54 2005
@@ -271,14 +271,6 @@
}
/**
- * Initialization.
- * @throws ResourcesException if an error occurs during initializtion.
- */
- public void init() throws ResourcesException {
- super.init();
- }
-
- /**
* Accessor method for Log instance.
*
* The Log instance variable is transient and
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResourcesFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResourcesFactory.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResourcesFactory.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/JDBCResourcesFactory.java Fri Nov 25 13:09:54 2005
@@ -60,8 +60,7 @@
* @exception ResourcesException if a {@link org.apache.commons.resources.Resources}
* instance of the specified logical name cannot be created.
*/
- protected Resources createResources(String name, String config)
- throws ResourcesException {
+ protected Resources createResources(String name, String config) {
Resources res = new JDBCResources(name, config);
res.setReturnNull(isReturnNull());
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/PropertyResourcesFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/PropertyResourcesFactory.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/PropertyResourcesFactory.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/PropertyResourcesFactory.java Fri Nov 25 13:09:54 2005
@@ -65,8 +65,7 @@
* @exception ResourcesException if a {@link org.apache.commons.resources.Resources}
* instance of the specified logical name cannot be created.
*/
- protected Resources createResources(String name, String config)
- throws ResourcesException {
+ protected Resources createResources(String name, String config) {
Resources res = new PropertyResources(name, config);
res.setReturnNull(isReturnNull());
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactory.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactory.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactory.java Fri Nov 25 13:09:54 2005
@@ -56,8 +56,7 @@
* @exception ResourcesException if a {@link org.apache.commons.resources.Resources} instance
* of the specified logical name cannot be created.
*/
- protected Resources createResources(String name, String config)
- throws ResourcesException {
+ protected Resources createResources(String name, String config) {
Resources res = new ResourceBundleResources(name, config);
res.setReturnNull(isReturnNull());
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesBase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesBase.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesBase.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesBase.java Fri Nov 25 13:09:54 2005
@@ -45,6 +45,14 @@
* <code>getString()</code>, on the assumption that most uses of
* {@link org.apache.commons.resources.Resources} are of this type.
* However, they can be easily overridden as needed.</p>
+ *
+ * @see org.apache.commons.resources.impl.CollectionResourcesBase
+ * @see org.apache.commons.resources.impl.JDBCResources
+ * @see org.apache.commons.resources.impl.PropertyResources
+ * @see org.apache.commons.resources.impl.ResourceBundleResources
+ * @see org.apache.commons.resources.impl.WebappPropertyResources
+ * @see org.apache.commons.resources.impl.WebappXMLResources
+ * @see org.apache.commons.resources.impl.XMLResources
*/
public abstract class ResourcesBase implements Resources {
@@ -106,7 +114,7 @@
*
* @exception ResourcesException if an error occurs during initialization
*/
- public void init() throws ResourcesException {
+ public void init() {
// The default implementation does nothing
@@ -123,7 +131,7 @@
*
* @exception ResourcesException if an error occurs during finalization
*/
- public void destroy() throws ResourcesException {
+ public void destroy() {
// The default implementation does nothing
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java Fri Nov 25 13:09:54 2005
@@ -36,6 +36,14 @@
* This implementation caches the {@link Resources} instances returned by
* a protected <code>createResources()</code> method, which must be implemented
* by concrete subclasses.</p>
+ *
+ * @see org.apache.commons.resources.impl.JDBCResourcesFactory
+ * @see org.apache.commons.resources.impl.PropertyResourcesFactory
+ * @see org.apache.commons.resources.impl.ResourceBundleResourcesFactory
+ * @see org.apache.commons.resources.impl.WebappResourcesFactoryBase
+ * @see org.apache.commons.resources.impl.WebappPropertyResourcesFactory
+ * @see org.apache.commons.resources.impl.WebappXMLResourcesFactory
+ * @see org.apache.commons.resources.impl.XMLResourcesFactory
*/
public abstract class ResourcesFactoryBase implements ResourcesFactory {
@@ -102,8 +110,7 @@
* @exception ResourcesException if a {@link Resources} instance
* of the specified logical name cannot be returned.
*/
- public Resources getResources(String name)
- throws ResourcesException {
+ public Resources getResources(String name) {
return (getResources(name, name));
@@ -126,8 +133,7 @@
* @exception ResourcesException if a {@link Resources} instance
* of the specified logical name cannot be returned.
*/
- public Resources getResources(String name, String config)
- throws ResourcesException {
+ public Resources getResources(String name, String config) {
synchronized (resources) {
Resources instance = (Resources) resources.get(name);
@@ -148,7 +154,7 @@
*
* @exception ResourcesException if a problem occurred while releasing
*/
- public void release() throws ResourcesException {
+ public void release() {
synchronized (resources) {
Iterator names = resources.keySet().iterator();
@@ -179,8 +185,7 @@
* @exception ResourcesException if a {@link Resources} instance
* of the specified logical name cannot be created.
*/
- protected abstract Resources createResources(String name, String config)
- throws ResourcesException;
+ protected abstract Resources createResources(String name, String config);
}
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java Fri Nov 25 13:09:54 2005
@@ -62,8 +62,7 @@
* @exception ResourcesException if a {@link org.apache.commons.resources.Resources} instance
* of the specified logical name cannot be created.
*/
- protected Resources createResources(String name, String config)
- throws ResourcesException {
+ protected Resources createResources(String name, String config) {
Resources res =
new WebappPropertyResources(name, config, getServletContext());
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java Fri Nov 25 13:09:54 2005
@@ -60,8 +60,7 @@
* @exception ResourcesException if a {@link org.apache.commons.resources.Resources} instance
* of the specified logical name cannot be created.
*/
- protected Resources createResources(String name, String config)
- throws ResourcesException {
+ protected Resources createResources(String name, String config) {
Resources res =
new WebappXMLResources(name, config, getServletContext());
Modified: jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/XMLResourcesFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/XMLResourcesFactory.java?rev=349025&r1=349024&r2=349025&view=diff
==============================================================================
--- jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/XMLResourcesFactory.java (original)
+++ jakarta/commons/proper/resources/trunk/src/java/org/apache/commons/resources/impl/XMLResourcesFactory.java Fri Nov 25 13:09:54 2005
@@ -57,8 +57,7 @@
* @exception ResourcesException if a {@link org.apache.commons.resources.Resources} instance
* of the specified logical name cannot be created.
*/
- protected Resources createResources(String name, String config)
- throws ResourcesException {
+ protected Resources createResources(String name, String config) {
Resources res = new XMLResources(name, config);
res.setReturnNull(isReturnNull());
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org