* Router: Allow null args to main() (broke Android)

This commit is contained in:
zzz
2014-02-20 14:08:05 +00:00
parent aab8b10adf
commit 91cdf85772
4 changed files with 26 additions and 20 deletions

View File

@@ -1,3 +1,7 @@
2014-02-20 zzz
* i2ptunnel: Add inproxy block option to HTTP server
* Router: Allow null args to main() (broke Android)
2014-02-17 zzz
* HMAC:
- Replace BC MD5 with JVM version, refactor I2PHMAC to use

View File

@@ -1109,10 +1109,12 @@ public class Router implements RouterClock.ClockShiftListener {
* Usage: Router [rebuild]
* No other options allowed, for now
*
* @param args non-null
* @param args null ok
* @throws IllegalArgumentException
*/
public static void main(String args[]) {
boolean rebuild = false;
if (args != null) {
boolean error = false;
Getopt g = new Getopt("router", args, "");
int c;
@@ -1122,7 +1124,6 @@ public class Router implements RouterClock.ClockShiftListener {
error = true;
}
}
boolean rebuild = false;
int remaining = args.length - g.getOptind();
if (remaining > 1) {
error = true;
@@ -1133,6 +1134,7 @@ public class Router implements RouterClock.ClockShiftListener {
}
if (error)
throw new IllegalArgumentException();
}
System.out.println("Starting I2P " + RouterVersion.FULL_VERSION);
//verifyWrapperConfig();

View File

@@ -14,7 +14,7 @@ public class RouterLaunch {
* Usage: RouterLaunch [rebuild]
* No other options allowed, for now
*
* @param args non-null
* @param args null ok
* @throws IllegalArgumentException
*/
public static void main(String args[]) {

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 9;
public final static long BUILD = 10;
/** for example "-test" */
public final static String EXTRA = "";