bloritsch 2003/02/25 07:35:43 Modified: src/xdocs book.xml src/java/org/apache/avalon/framework/service DefaultServiceSelector.java Log: Remove a deprecation warning from compiling the default ServiceSelector PR: Obtained from: Submitted by: Reviewed by: CVS: ---------------------------------------------------------------------- CVS: PR: CVS: If this change addresses a PR in the problem report tracking CVS: database, then enter the PR number(s) here. CVS: Obtained from: CVS: If this change has been taken from another system, such as NCSA, CVS: then name the system in this line, otherwise delete it. CVS: Submitted by: CVS: If this code has been contributed to Apache by someone else; i.e., CVS: they sent us a patch or a new module, then include their name/email CVS: address here. If this is your work then delete this line. CVS: Reviewed by: CVS: If we are doing pre-commit code reviews and someone else has CVS: reviewed your changes, include their name(s) here. CVS: If you have not had it reviewed then delete this line. Revision Changes Path 1.22 +2 -2 avalon/src/xdocs/book.xml Index: book.xml =================================================================== RCS file: /home/cvs/avalon/src/xdocs/book.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- book.xml 20 Feb 2003 15:56:36 -0000 1.21 +++ book.xml 25 Feb 2003 15:35:43 -0000 1.22 @@ -9,7 +9,7 @@ <menu label="Essentials"> <menu-item label="Overview" href="index.html"/> <menu-item label="Getting Started" href="getting-started.html"/> - <menu-item label="Download" href="http://avalon.apache.org/bindownload.cgi"/> + <menu-item label="Download" href="http://avalon.apache.org/bindownload.cgi"/> </menu> <menu label="Guide"> @@ -23,7 +23,7 @@ <menu label="Reference"> <menu-item label="Changes" href="changes.html"/> - <menu-item label="API Docs" href="http://avalon.apache.org/api/index.html"/> + <menu-item label="API Docs" href="http://avalon.apache.org/framework/api/index.html"/> <menu-item label="The Lifecycle" href="reference-the-lifecycle.html"/> <menu-item label="Containers" href="reference-containers.html"/> </menu> 1.14 +28 -3 avalon/src/java/org/apache/avalon/framework/service/DefaultServiceSelector.java Index: DefaultServiceSelector.java =================================================================== RCS file: /home/cvs/avalon/src/java/org/apache/avalon/framework/service/DefaultServiceSelector.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- DefaultServiceSelector.java 11 Feb 2003 15:58:42 -0000 1.13 +++ DefaultServiceSelector.java 25 Feb 2003 15:35:43 -0000 1.14 @@ -68,6 +68,32 @@ { private final HashMap m_objects = new HashMap(); private boolean m_readOnly; + private final String m_role; + + /** + * Create a DefaultServiceSelector with a default empty role. + */ + public DefaultServiceSelector() + { + this(""); + } + + /** + * Create a DefaultServiceSelector with a role for debug purposes. + * + * @param role The role for this selector. + * + * @throws NullPointerException if the role is null. + */ + public DefaultServiceSelector(String role) + { + if ( null==role ) + { + throw new NullPointerException(role); + } + + m_role = role; + } /** * Select the desired object. @@ -87,8 +113,7 @@ } else { - throw new ServiceException( "Unable to provide implementation for " - + hint.toString() ); + throw new ServiceException( m_role + "/" + hint.toString(), "Unable to provide implementation" ); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]