forked from I2P_Developers/i2p.i2p
- Fix VersionComparator (thx zab)
- Add debug output
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package net.i2p.update;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
|
||||
@ -79,4 +81,9 @@ public interface UpdateManager {
|
||||
* @return true if valid, false if corrupt
|
||||
*/
|
||||
public boolean notifyComplete(UpdateTask task, String actualVersion, File file);
|
||||
|
||||
/**
|
||||
* For debugging
|
||||
*/
|
||||
public void renderStatusHTML(Writer out) throws IOException;
|
||||
}
|
||||
|
@ -46,10 +46,9 @@ public class VersionComparator implements Comparator<String> {
|
||||
} catch (NumberFormatException nfe) {
|
||||
return 1;
|
||||
}
|
||||
long diff = left - right;
|
||||
if (diff < 0)
|
||||
if (left < right)
|
||||
return -1;
|
||||
if (diff > 0)
|
||||
if (left > right)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user