proyal 2002/08/16 06:37:31
Modified: src/java/org/apache/avalon/phoenix/tools/infobuilder
BlockInfoBuilder.java Resources.properties
Log:
* Move strings to resource file
* Correct misspelling + style fixup
Revision Changes Path
1.22 +15 -12
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/BlockInfoBuilder.java
Index: BlockInfoBuilder.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/BlockInfoBuilder.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- BlockInfoBuilder.java 16 Aug 2002 11:48:12 -0000 1.21
+++ BlockInfoBuilder.java 16 Aug 2002 13:37:31 -0000 1.22
@@ -58,16 +58,14 @@
{
if( info.getChild("stages", false ) != null )
{
- final String error =
- "Poenix does not support components declaring phase extension
dependecies."
- + " Class: " + classname;
+ final String error = REZ.getString( "unsupported.stages", classname
);
+
throw new IllegalArgumentException( error );
}
if( info.getChild("extensions", false ) != null )
{
- final String error =
- "Poenix does not support components declaring phase extension
handlers."
- + " Class: " + classname;
+ final String error = REZ.getString( "unsupported.extensions",
classname );
+
throw new IllegalArgumentException( error );
}
}
@@ -286,13 +284,18 @@
*/
private String getSchemaAttribute( Configuration config ) throws
ConfigurationException
{
- Configuration[] attributes = config.getChildren("attribute");
- for( int i=0; i<attributes.length; i++ )
+ final Configuration[] attributes = config.getChildren( "attribute" );
+
+ for( int i = 0; i < attributes.length; i++ )
{
- Configuration attribute = attributes[i];
- if( attribute.getAttribute("key").equals("phoenix:shema-type") )
- return attribute.getAttribute("value");
+ final Configuration attribute = attributes[i];
+
+ if( attribute.getAttribute( "key" ).equals( "phoenix:schema-type" ) )
+ {
+ return attribute.getAttribute( "value" );
+ }
}
+
return null;
}
1.4 +2 -0
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/Resources.properties
Index: Resources.properties
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/Resources.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Resources.properties 25 Jan 2002 22:18:27 -0000 1.3
+++ Resources.properties 16 Aug 2002 13:37:31 -0000 1.4
@@ -1,3 +1,5 @@
+unsupported.stages=Blocks declaring stage dependecies are not supported. Class: {0}
+unsupported.extensions=Blocks declaring extension dependecies are not supported.
Class: {0}
blockinfo-created=Constructed BlockInfo object for class {0}. BlockInfo contains
{1} services and {2} dependencies.
missing-block=Warning: Unspecified <block/> section in BlockInfo for class {0}.
redundent-role=Warning: BlockInfo for class {0} redundently specifies role name
"{1}" in dependency when it is identical to the name of service. It is recomended that
the <role/> section be elided.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>