[MNG-5716] return toolchains that are of expected type

This commit is contained in:
Hervé Boutemy 2014-11-02 19:41:00 +01:00
parent 608b430f7d
commit 2252862e2a
1 changed files with 8 additions and 8 deletions

View File

@ -48,23 +48,23 @@ public class DefaultToolchainManagerPrivate
List<ToolchainPrivate> toRet = new ArrayList<ToolchainPrivate>();
if ( pers != null )
ToolchainFactory fact = factories.get( type );
if ( fact == null )
{
logger.error( "Missing toolchain factory for type: " + type
+ ". Possibly caused by misconfigured project." );
}
else if ( pers != null )
{
List<ToolchainModel> lst = pers.getToolchains();
if ( lst != null )
{
for ( ToolchainModel toolchainModel : lst )
{
ToolchainFactory fact = factories.get( toolchainModel.getType() );
if ( fact != null )
if ( type.equals( toolchainModel.getType() ) )
{
toRet.add( fact.createToolchain( toolchainModel ) );
}
else
{
logger.error( "Missing toolchain factory for type: " + toolchainModel.getType()
+ ". Possibly caused by misconfigured project." );
}
}
}
}