Skip to content

Commit

Permalink
Fixed spurious exception when optional depenency was missing
Browse files Browse the repository at this point in the history
  • Loading branch information
lincolnthree committed Dec 7, 2012
1 parent 48a03d5 commit fd9e1ec
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void addAddonDependencies(AddonId found, Builder builder) throws Contain
PathFilters.not(PathFilters.getMetaInfFilter()),
dependency.isExport() ? PathFilters.acceptAll() : PathFilters.rejectAll(),
this,
moduleId,
toModuleId(dependency.getId()),
dependency.isOptional()));
}
}
Expand Down Expand Up @@ -187,13 +187,18 @@ private ModuleIdentifier findCompatibleInstalledModule(AddonDependency dependenc

if (found != null)
{
String[] split = found.toModuleId().split(":");
return ModuleIdentifier.create(split[0], split[1]);
return toModuleId(found);
}

return null;
}

public ModuleIdentifier toModuleId(AddonId id)
{
String[] split = id.toModuleId().split(":");
return ModuleIdentifier.create(split[0], split[1]);
}

@Override
public String toString()
{
Expand Down

0 comments on commit fd9e1ec

Please sign in to comment.