Skip to content

Commit

Permalink
Supressed last comma when apiVersion is not specified in AddonId coords
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jan 7, 2013
1 parent c576cba commit ce10678
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ public static AddonId from(String name, String version, String apiVersion)

public String toCoordinates()
{
return getName() + "," + getVersion() + "," + getApiVersion();
StringBuilder coord = new StringBuilder(getName()).append(",").append(getVersion());
if (getApiVersion() != null && !getApiVersion().isEmpty())
{
coord.append(",").append(getApiVersion());
}
return coord.toString();
}

public String toModuleId()
Expand Down

0 comments on commit ce10678

Please sign in to comment.