notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2281 - development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2281 - development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl
- Date: Thu, 14 Apr 2005 14:53:31 -0400
Author: mcconnell AT dpml.net
Date: Thu Apr 14 14:53:23 2005
New Revision: 2281
Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModelComponentHelper.java
Log:
fix null name issue
Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModelComponentHelper.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModelComponentHelper.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModelComponentHelper.java
Thu Apr 14 14:53:23 2005
@@ -129,6 +129,8 @@
throw new NullArgumentException( "profile" );
}
+ String resolvedName = getNonNullName( name, profile );
+
SystemContext system = m_context.getSystemContext();
final String partition = m_model.getPartition();
LoggingManager logging = system.getLoggingManager();
@@ -138,12 +140,13 @@
logging.addCategories( partition, categories );
}
- Logger logger = logging.getLoggerForCategory( partition + name );
+ Logger logger = logging.getLoggerForCategory( partition +
resolvedName );
DependencyGraph graph = m_context.getDependencyGraph();
ClassLoader parent = m_context.getClassLoader();
ClassLoader classloader = getClassLoader( parent, profile );
- final File dir = new File( m_context.getWorkingDirectory(), name );
- final File temp = new File( m_context.getTempDirectory(), name );
+
+ final File dir = new File( m_context.getWorkingDirectory(),
resolvedName );
+ final File temp = new File( m_context.getTempDirectory(),
resolvedName );
try
{
@@ -153,7 +156,7 @@
return new DefaultComponentContext(
logger,
- name,
+ resolvedName,
system,
classloader,
graph,
@@ -174,7 +177,7 @@
REZ.getString(
"containment.deployment.create.error",
m_model.getPath(),
- name );
+ resolvedName );
throw new ModelException( error, e );
}
}
@@ -224,4 +227,15 @@
}
}
+ private String getNonNullName( String name, final ComponentProfile
profile )
+ {
+ if( null != name )
+ {
+ return name;
+ }
+ else
+ {
+ return profile.getName();
+ }
+ }
}
- svn commit: r2281 - development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl, mcconnell, 04/14/2005
Archive powered by MHonArc 2.6.24.