[go: nahoru, domu]

Skip to content

Commit

Permalink
Revert "#381 Removed showing the latest version when there"
Browse files Browse the repository at this point in the history
Issue #381 was targeted for milestone 2.3. I am not sure why commit
8ed7e5d was made to master for 2.2. That commit breaks the OSGi build.
A better solution to #381 needs to be considered for 2.3.

This reverts commit 8ed7e5d.
  • Loading branch information
bjhargrave committed Sep 7, 2013
1 parent b34de2f commit e3dce61
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion biz.aQute.bndlib/src/aQute/lib/deployer/FileRepo.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ public List<String> list(String regex) throws Exception {

public SortedSet<Version> versions(String bsn) throws Exception {
init();
boolean haslatest = false;
File dir = new File(root, bsn);
if (dir.isDirectory()) {
String versions[] = dir.list();
Expand All @@ -455,10 +456,14 @@ public SortedSet<Version> versions(String bsn) throws Exception {
Matcher m = REPO_FILE.matcher(v);
if (m.matches()) {
String version = m.group(2);
if (!version.equals("latest"))
if (version.equals("latest"))
haslatest = true;
else
list.add(new Version(version));
}
}
if ( list.isEmpty() && haslatest)
list.add( new Version(MAX_MAJOR,0,0));
return new SortedList<Version>(list);
}
return SortedList.empty();
Expand Down

0 comments on commit e3dce61

Please sign in to comment.