You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2004/03/13 19:00:44 UTC
cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/container CocoonContainer.java
cziegeler 2004/03/13 10:00:44
Modified: src/java/org/apache/cocoon/components/container
CocoonContainer.java
Log:
Formatting
Revision Changes Path
1.3 +17 -16 cocoon-2.2/src/java/org/apache/cocoon/components/container/CocoonContainer.java
Index: CocoonContainer.java
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/container/CocoonContainer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CocoonContainer.java 8 Mar 2004 13:57:37 -0000 1.2
+++ CocoonContainer.java 13 Mar 2004 18:00:44 -0000 1.3
@@ -30,22 +30,25 @@
* @author <a href="bloritsch.at.apache.org">Berin Loritsch</a>
* @version CVS $ Revision: 1.1 $
*/
-public class CocoonContainer extends DefaultContainer
-{
+public class CocoonContainer extends DefaultContainer {
+
/**
* Provide some validation for the core Cocoon components
*
* @param conf The configuration
* @throws ConfigurationException if the coniguration is invalid
*/
- public void configure( Configuration conf ) throws ConfigurationException
- {
- if ( !"cocoon".equals( conf.getName() ) ) throw new ConfigurationException( "Invalid configuration format",
+ public void configure( Configuration conf )
+ throws ConfigurationException {
+ if ( !"cocoon".equals( conf.getName() ) ) {
+ throw new ConfigurationException( "Invalid configuration format",
conf );
- String confVersion = conf.getAttribute( "version" );
+ }
+ final String confVersion = conf.getAttribute( "version" );
- if ( !Constants.CONF_VERSION.equals( confVersion ) ) throw new ConfigurationException(
- "Uncompatible configuration format", conf );
+ if ( !Constants.CONF_VERSION.equals( confVersion ) ) {
+ throw new ConfigurationException("Uncompatible configuration format", conf );
+ }
super.configure( conf );
}
@@ -59,23 +62,21 @@
* @return The component for the role/hint combo
* @throws ServiceException if the role/hint combo cannot be resolved.
*/
- public Object get( final String role, final Object hint ) throws ServiceException
- {
+ public Object get( final String role, final Object hint )
+ throws ServiceException {
Object component = null;
if ( null != hint
&& !AbstractContainer.DEFAULT_ENTRY.equals( hint )
- && !AbstractContainer.SELECTOR_ENTRY.equals( hint ) )
- {
+ && !AbstractContainer.SELECTOR_ENTRY.equals( hint ) ) {
+
Map implementations = (Map) m_mapper.get( role );
- if ( null != implementations )
- {
+ if ( null != implementations ) {
component = implementations.get( hint );
}
}
- if ( null == component )
- {
+ if ( null == component ) {
component = super.get( role, hint );
}