Skip to content

Commit

Permalink
FORGE-2011: Fixed version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Sep 12, 2014
1 parent 8a23d03 commit e75236d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public EnableRequest enable(final AddonId id, final AddonRepository repository)

/**
* Calculate the necessary request based in the list of installed addons for a given {@link MutableAddonRepository}
*
*
* @param addonInfo
* @param repository
* @param installedAddons
Expand Down Expand Up @@ -182,7 +182,7 @@ private AddonActionRequest createRequest(final AddonInfo requestedAddonInfo, fin
if (differentVersionEntry != null)
{
//TODO: Review condition below
if (differentVersionEntry.getKey().getVersion().toString().compareTo(addon.getVersion().toString()) < 0)
if (differentVersionEntry.getKey().getVersion().compareTo(addon.getVersion()) < 0)
{
if (repository.equals(differentVersionEntry.getValue()))
{
Expand All @@ -209,9 +209,9 @@ private AddonActionRequest createRequest(final AddonInfo requestedAddonInfo, fin

/**
* Collect all required addons for a specific addon.
*
*
* It traverses the whole graph
*
*
* @param addonInfo
* @param addons
*/
Expand Down

0 comments on commit e75236d

Please sign in to comment.