notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1218 - trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1218 - trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks
- Date: Sat, 18 Mar 2006 21:48:56 +0100
Author: mcconnell
Date: 2006-03-18 21:48:54 +0100 (Sat, 18 Mar 2006)
New Revision: 1218
Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
Log:
fix issue on strategy resolution
Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
2006-03-18 20:38:48 UTC (rev 1217)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
2006-03-18 20:48:54 UTC (rev 1218)
@@ -243,37 +243,30 @@
if( null == m_strategy )
{
Type type = resource.getType( TYPE );
- if( type instanceof Strategy )
+ Object data = type.getData();
+ if( null != data )
{
- return (Strategy) type;
- }
- else
- {
- Object data = type.getData();
- if( null != data )
+ if( data instanceof Strategy )
{
- if( data instanceof Strategy )
- {
- return (Strategy) data;
- }
- else
- {
- final String error =
- "Datatype associated as the 'part' datastructure
is not an instance of "
- + Strategy.class.getName() + "."
- + "\nClass " + type.getClass().getName();
- throw new BuildException( error, getLocation() );
- }
+ return (Strategy) data;
}
else
{
- final String error =
- "No data associated with part declaration."
- + "\nResource: " + resource
- + "\nType: " + TYPE;
+ final String error =
+ "Datatype associated as the 'part' datastructure is
not an instance of "
+ + Strategy.class.getName() + "."
+ + "\nClass " + type.getClass().getName();
throw new BuildException( error, getLocation() );
}
}
+ else
+ {
+ final String error =
+ "No data associated with part declaration."
+ + "\nResource: " + resource
+ + "\nType: " + TYPE;
+ throw new BuildException( error, getLocation() );
+ }
}
else
{
- r1218 - trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks, mcconnell at BerliOS, 03/18/2006
Archive powered by MHonArc 2.6.24.