vgritsenko 2004/06/03 05:37:56
Modified: src/java/org/apache/cocoon/components/flow
InterpreterSelector.java
Log:
align code
Revision Changes Path
1.4 +35 -36
cocoon-2.1/src/java/org/apache/cocoon/components/flow/InterpreterSelector.java
Index: InterpreterSelector.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/InterpreterSelector.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InterpreterSelector.java 5 Mar 2004 13:02:46 -0000 1.3
+++ InterpreterSelector.java 3 Jun 2004 12:37:56 -0000 1.4
@@ -1,12 +1,12 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,39 +26,38 @@
* @version CVS $Id$
*/
public class InterpreterSelector extends ExcaliburComponentSelector
- implements Configurable, ThreadSafe
-{
- private String defaultLanguage;
-
- public void configure(Configuration config)
- throws ConfigurationException
- {
- super.configure(config);
-
- defaultLanguage = config.getAttribute("default", null);
-
- // Finish the initialization of the already created components
- Configuration[] configurations =
config.getChildren("component-instance");
- if (configurations.length == 0)
- throw new ConfigurationException("No languages defined!");
-
- for (int i = 0; i < configurations.length; i++) {
- Configuration conf = configurations[i];
- String hint = conf.getAttribute("name").trim();
-
- if (!this.getComponentHandlers().containsKey(hint)) {
- throw new ConfigurationException(
- "Could not find component for hint: " + hint
- );
- }
+ implements Configurable, ThreadSafe {
+
+ private String defaultLanguage;
- if (i == 0 && defaultLanguage == null)
- defaultLanguage = hint;
+ public void configure(Configuration config) throws
ConfigurationException {
+ super.configure(config);
+
+ this.defaultLanguage = config.getAttribute("default", null);
+
+ // Finish the initialization of the already created components
+ Configuration[] configurations =
config.getChildren("component-instance");
+ if (configurations.length == 0) {
+ throw new ConfigurationException("No languages defined!");
+ }
+
+ for (int i = 0; i < configurations.length; i++) {
+ Configuration conf = configurations[i];
+ String hint = conf.getAttribute("name").trim();
+
+ if (!this.getComponentHandlers().containsKey(hint)) {
+ throw new ConfigurationException(
+ "Could not find component for hint: " + hint
+ );
+ }
+
+ if (i == 0 && defaultLanguage == null) {
+ defaultLanguage = hint;
+ }
+ }
}
- }
- public String getDefaultLanguage()
- {
- return defaultLanguage;
- }
+ public String getDefaultLanguage() {
+ return defaultLanguage;
+ }
}