From 4247360de914e5b34e121b1e32ff562625556133 Mon Sep 17 00:00:00 2001 From: Britton Isbell Date: Wed, 21 Jan 2009 10:56:31 +0000 Subject: [PATCH] MNG-3973 git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@736283 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/mercury/MavenDependencyProcessor.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java b/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java index ed2b16770b..09737aa7ab 100644 --- a/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java +++ b/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java @@ -109,7 +109,7 @@ public final class MavenDependencyProcessor List parentModels = getParentsOfDomainModel( domainModel, mdReader ); if( parentModels == null ) - throw new DependencyProcessorException( "cannor read parent for " + bmd.getGAV() ); + throw new DependencyProcessorException( "cannot read parent for " + bmd.getGAV() ); domainModels.addAll( parentModels ); } @@ -136,13 +136,18 @@ public final class MavenDependencyProcessor } private static List getParentsOfDomainModel( MavenDomainModel domainModel, MetadataReader mdReader ) - throws IOException, MetadataReaderException + throws IOException, MetadataReaderException, DependencyProcessorException { List domainModels = new ArrayList(); if ( domainModel.hasParent() ) { + byte[] b = mdReader.readMetadata( domainModel.getParentMetadata() ); + + if ( b == null || b.length < 1 ) + throw new DependencyProcessorException( "cannot read metadata for " + domainModel.getParentMetadata() ); + MavenDomainModel parentDomainModel = - new MavenDomainModel( mdReader.readMetadata( domainModel.getParentMetadata() ) ); + new MavenDomainModel( b ); domainModels.add( parentDomainModel ); domainModels.addAll( getParentsOfDomainModel( parentDomainModel, mdReader ) ); }