mcconnell 2003/02/27 14:53:34
Modified: meta/src/java/org/apache/avalon/meta/model
ContextDirective.java
meta/src/java/org/apache/avalon/meta/model/builder
XMLProfileCreator.java
Log:
Removed assumptions concerning default context class.
Revision Changes Path
1.4 +2 -9
avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/ContextDirective.java
Index: ContextDirective.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/ContextDirective.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContextDirective.java 7 Feb 2003 15:39:51 -0000 1.3
+++ ContextDirective.java 27 Feb 2003 22:53:34 -0000 1.4
@@ -115,14 +115,7 @@
*/
public ContextDirective( final String classname, final Import[] imports, final
Entry[] entries )
{
- if( classname != null )
- {
- m_classname = classname;
- }
- else
- {
- m_classname = DEFAULT_CONTEXT_CLASS;
- }
+ m_classname = classname;
m_imports = imports;
m_entries = entries;
}
1.8 +3 -6
avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/builder/XMLProfileCreator.java
Index: XMLProfileCreator.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/builder/XMLProfileCreator.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XMLProfileCreator.java 7 Feb 2003 15:39:52 -0000 1.7
+++ XMLProfileCreator.java 27 Feb 2003 22:53:34 -0000 1.8
@@ -268,9 +268,7 @@
private Profile createImplicitProfile( Type type ) throws Exception
{
ContextDirective context =
- new ContextDirective(
- ContextDirective.DEFAULT_CONTEXT_CLASS,
- new Import[ 0 ], new Entry[ 0 ] );
+ new ContextDirective( null, new Import[ 0 ], new Entry[ 0 ] );
final Configuration defaults =
new DefaultConfiguration( "default", null );
final LoggingDirective categories =
@@ -300,8 +298,7 @@
public ContextDirective createContextDirective( Configuration config )
throws ConfigurationException
{
- String classname = config.getAttribute(
- "class", ContextDirective.DEFAULT_CONTEXT_CLASS );
+ String classname = config.getAttribute( "class", null );
Import[] imports = createImports( config.getChildren( "import" ) );
Entry[] entries = createEntries( config.getChildren( "entry" ) );
return new ContextDirective( classname, imports, entries );
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]