forked from I2P_Developers/i2p.i2p
* Console:
- Rewrite TrustedUpdate version comparator, use for netdb version table so 0.7.10 will be sorted correctly - Reduce netdb.jsp memory usage - More tagging fixups - configclients.jsp fixup for "Web console"
This commit is contained in:
@ -31,9 +31,14 @@ public class ConfigClientsHandler extends FormHandler {
|
|||||||
protected void processForm() {
|
protected void processForm() {
|
||||||
if (_action.equals(_("Save Client Configuration"))) {
|
if (_action.equals(_("Save Client Configuration"))) {
|
||||||
saveClientChanges();
|
saveClientChanges();
|
||||||
} else if (_action.equals(_("Save WebApp Configuration"))) {
|
return;
|
||||||
|
}
|
||||||
|
if (_action.equals(_("Save WebApp Configuration"))) {
|
||||||
saveWebAppChanges();
|
saveWebAppChanges();
|
||||||
} else if (_action.startsWith("Start ")) {
|
return;
|
||||||
|
}
|
||||||
|
// value
|
||||||
|
if (_action.startsWith("Start ")) {
|
||||||
String app = _action.substring(6);
|
String app = _action.substring(6);
|
||||||
int appnum = -1;
|
int appnum = -1;
|
||||||
try {
|
try {
|
||||||
@ -43,10 +48,14 @@ public class ConfigClientsHandler extends FormHandler {
|
|||||||
startClient(appnum);
|
startClient(appnum);
|
||||||
else
|
else
|
||||||
startWebApp(app);
|
startWebApp(app);
|
||||||
} else if (_action.toLowerCase().startsWith("Start<span class=hide> ") &&
|
return;
|
||||||
|
}
|
||||||
|
// label (IE)
|
||||||
|
String xStart = _("Start");
|
||||||
|
if (_action.toLowerCase().startsWith(xStart + "<span class=hide> ") &&
|
||||||
_action.toLowerCase().endsWith("</span>")) {
|
_action.toLowerCase().endsWith("</span>")) {
|
||||||
// IE sucks
|
// IE sucks
|
||||||
String app = _action.substring(23, _action.length() - 7);
|
String app = _action.substring(xStart.length() + 18, _action.length() - 7);
|
||||||
int appnum = -1;
|
int appnum = -1;
|
||||||
try {
|
try {
|
||||||
appnum = Integer.parseInt(app);
|
appnum = Integer.parseInt(app);
|
||||||
@ -56,7 +65,7 @@ public class ConfigClientsHandler extends FormHandler {
|
|||||||
else
|
else
|
||||||
startWebApp(app);
|
startWebApp(app);
|
||||||
} else {
|
} else {
|
||||||
addFormError(_("Unsupported") + " " + _action + ".");
|
addFormError(_("Unsupported") + ' ' + _action + '.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +76,7 @@ public class ConfigClientsHandler extends FormHandler {
|
|||||||
for (int cur = 0; cur < clients.size(); cur++) {
|
for (int cur = 0; cur < clients.size(); cur++) {
|
||||||
ClientAppConfig ca = (ClientAppConfig) clients.get(cur);
|
ClientAppConfig ca = (ClientAppConfig) clients.get(cur);
|
||||||
Object val = _settings.get(cur + ".enabled");
|
Object val = _settings.get(cur + ".enabled");
|
||||||
if (! "webConsole".equals(ca.clientName))
|
if (! ("webConsole".equals(ca.clientName) || "Web console".equals(ca.clientName)))
|
||||||
ca.disabled = val == null;
|
ca.disabled = val == null;
|
||||||
}
|
}
|
||||||
ClientAppConfig.writeClientAppConfig(_context, clients);
|
ClientAppConfig.writeClientAppConfig(_context, clients);
|
||||||
@ -82,7 +91,7 @@ public class ConfigClientsHandler extends FormHandler {
|
|||||||
}
|
}
|
||||||
ClientAppConfig ca = (ClientAppConfig) clients.get(i);
|
ClientAppConfig ca = (ClientAppConfig) clients.get(i);
|
||||||
LoadClientAppsJob.runClient(ca.className, ca.clientName, LoadClientAppsJob.parseArgs(ca.args), configClient_log);
|
LoadClientAppsJob.runClient(ca.className, ca.clientName, LoadClientAppsJob.parseArgs(ca.args), configClient_log);
|
||||||
addFormNotice(_("Client") + " " + ca.clientName + " " + _("started") + ".");
|
addFormNotice(_("Client") + ' ' + _(ca.clientName) + ' ' + _("started") + '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveWebAppChanges() {
|
private void saveWebAppChanges() {
|
||||||
@ -117,9 +126,9 @@ public class ConfigClientsHandler extends FormHandler {
|
|||||||
path = new File(path, app + ".war");
|
path = new File(path, app + ".war");
|
||||||
s.addWebApplication("/"+ app, path.getAbsolutePath()).start();
|
s.addWebApplication("/"+ app, path.getAbsolutePath()).start();
|
||||||
// no passwords... initialize(wac);
|
// no passwords... initialize(wac);
|
||||||
addFormNotice("WebApp <a href=\"/" + app + "/\">" + app + "</a> " + _("started") + ".");
|
addFormNotice(_("WebApp") + " <a href=\"/" + app + "/\">" + _(app) + "</a> " + _("started") + '.');
|
||||||
} catch (Exception ioe) {
|
} catch (Exception ioe) {
|
||||||
addFormError(_("Failed to start") + " " + app + " " + ioe + ".");
|
addFormError(_("Failed to start") + ' ' + _(app) + " " + ioe + '.');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,8 @@ public class ConfigClientsHelper extends HelperBase {
|
|||||||
List clients = ClientAppConfig.getClientApps(_context);
|
List clients = ClientAppConfig.getClientApps(_context);
|
||||||
for (int cur = 0; cur < clients.size(); cur++) {
|
for (int cur = 0; cur < clients.size(); cur++) {
|
||||||
ClientAppConfig ca = (ClientAppConfig) clients.get(cur);
|
ClientAppConfig ca = (ClientAppConfig) clients.get(cur);
|
||||||
renderForm(buf, ""+cur, ca.clientName, false, !ca.disabled, "webConsole".equals(ca.clientName),
|
renderForm(buf, ""+cur, ca.clientName, false, !ca.disabled,
|
||||||
|
"webConsole".equals(ca.clientName) || "Web console".equals(ca.clientName),
|
||||||
ca.className + ((ca.args != null) ? " " + ca.args : ""));
|
ca.className + ((ca.args != null) ? " " + ca.args : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,11 +98,11 @@ public class ConfigRestartBean {
|
|||||||
return Long.MAX_VALUE/2; // summaryframe.jsp adds a safety factor so we don't want to overflow...
|
return Long.MAX_VALUE/2; // summaryframe.jsp adds a safety factor so we don't want to overflow...
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String _(String s, RouterContext ctx) {
|
private static String _(String s, RouterContext ctx) {
|
||||||
return Messages.getString(s, ctx);
|
return Messages.getString(s, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String _(String s, Object o, RouterContext ctx) {
|
private static String _(String s, Object o, RouterContext ctx) {
|
||||||
return Messages.getString(s, o, ctx);
|
return Messages.getString(s, o, ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,9 @@ public class ConfigTunnelsHandler extends FormHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (updated > 0)
|
if (updated > 0)
|
||||||
addFormNotice("Updated settings for " + updated + " pools.");
|
// the count isn't really correct anyway, since we don't check for actual changes
|
||||||
|
//addFormNotice("Updated settings for " + updated + " pools.");
|
||||||
|
addFormNotice(_("Updated settings for all pools."));
|
||||||
|
|
||||||
if (saveRequired) {
|
if (saveRequired) {
|
||||||
boolean saved = _context.router().saveConfig();
|
boolean saved = _context.router().saveConfig();
|
||||||
|
@ -18,6 +18,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
|
import net.i2p.crypto.TrustedUpdate;
|
||||||
import net.i2p.data.DataHelper;
|
import net.i2p.data.DataHelper;
|
||||||
import net.i2p.data.Destination;
|
import net.i2p.data.Destination;
|
||||||
import net.i2p.data.Hash;
|
import net.i2p.data.Hash;
|
||||||
@ -131,14 +132,9 @@ public class NetDbRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void renderStatusHTML(Writer out, boolean full) throws IOException {
|
public void renderStatusHTML(Writer out, boolean full) throws IOException {
|
||||||
int size = _context.netDb().getKnownRouters() * 512;
|
|
||||||
if (full)
|
|
||||||
size *= 4;
|
|
||||||
StringBuilder buf = new StringBuilder(size);
|
|
||||||
out.write("<h2>" + _("Network Database Contents") + " (<a href=\"netdb.jsp?l=1\">" + _("View") + " LeaseSets</a>)</h2>\n");
|
out.write("<h2>" + _("Network Database Contents") + " (<a href=\"netdb.jsp?l=1\">" + _("View") + " LeaseSets</a>)</h2>\n");
|
||||||
if (!_context.netDb().isInitialized()) {
|
if (!_context.netDb().isInitialized()) {
|
||||||
buf.append("" + _("Not initialized") + "\n");
|
out.write(_("Not initialized"));
|
||||||
out.write(buf.toString());
|
|
||||||
out.flush();
|
out.flush();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -146,11 +142,12 @@ public class NetDbRenderer {
|
|||||||
Hash us = _context.routerHash();
|
Hash us = _context.routerHash();
|
||||||
out.write("<a name=\"routers\" ></a><h3>" + _("Routers") + " (<a href=\"netdb.jsp");
|
out.write("<a name=\"routers\" ></a><h3>" + _("Routers") + " (<a href=\"netdb.jsp");
|
||||||
if (full)
|
if (full)
|
||||||
out.write("#routers\" >" + _("view without") + "");
|
out.write("#routers\" >" + _("view without"));
|
||||||
else
|
else
|
||||||
out.write("?f=1#routers\" >" + _("view with") + "");
|
out.write("?f=1#routers\" >" + _("view with"));
|
||||||
out.write(" " + _("stats") + "</a>)</h3>\n");
|
out.write(' ' + _("stats") + "</a>)</h3>\n");
|
||||||
|
|
||||||
|
StringBuilder buf = new StringBuilder(8192);
|
||||||
RouterInfo ourInfo = _context.router().getRouterInfo();
|
RouterInfo ourInfo = _context.router().getRouterInfo();
|
||||||
renderRouterInfo(buf, ourInfo, true, true);
|
renderRouterInfo(buf, ourInfo, true, true);
|
||||||
out.write(buf.toString());
|
out.write(buf.toString());
|
||||||
@ -181,7 +178,7 @@ public class NetDbRenderer {
|
|||||||
buf.append("<table border=\"0\" cellspacing=\"30\"><tr><td>");
|
buf.append("<table border=\"0\" cellspacing=\"30\"><tr><td>");
|
||||||
List<String> versionList = new ArrayList(versions.objects());
|
List<String> versionList = new ArrayList(versions.objects());
|
||||||
if (versionList.size() > 0) {
|
if (versionList.size() > 0) {
|
||||||
Collections.sort(versionList, Collections.reverseOrder());
|
Collections.sort(versionList, Collections.reverseOrder(new TrustedUpdate.VersionComparator()));
|
||||||
buf.append("<table>\n");
|
buf.append("<table>\n");
|
||||||
buf.append("<tr><th>" + _("Version") + "</th><th>" + _("Count") + "</th></tr>\n");
|
buf.append("<tr><th>" + _("Version") + "</th><th>" + _("Count") + "</th></tr>\n");
|
||||||
for (String routerVersion : versionList) {
|
for (String routerVersion : versionList) {
|
||||||
|
@ -339,7 +339,7 @@ class ProfileOrganizerRenderer {
|
|||||||
* Do not double the single quotes in the parameter.
|
* Do not double the single quotes in the parameter.
|
||||||
* Use autoboxing to call with ints, longs, floats, etc.
|
* Use autoboxing to call with ints, longs, floats, etc.
|
||||||
*/
|
*/
|
||||||
public String _(String s, Object o) {
|
private String _(String s, Object o) {
|
||||||
return Messages.getString(s, o, _context);
|
return Messages.getString(s, o, _context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,18 +396,21 @@ public class SummaryHelper extends HelperBase {
|
|||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** compare translated nicknames - put "shared clients" first in the sort */
|
||||||
private class AlphaComparator implements Comparator {
|
private class AlphaComparator implements Comparator {
|
||||||
public int compare(Object lhs, Object rhs) {
|
public int compare(Object lhs, Object rhs) {
|
||||||
String lname = getName((Destination)lhs);
|
String lname = getName((Destination)lhs);
|
||||||
String rname = getName((Destination)rhs);
|
String rname = getName((Destination)rhs);
|
||||||
if (lname.equals("shared clients"))
|
String xsc = _("shared clients");
|
||||||
|
if (lname.equals(xsc))
|
||||||
return -1;
|
return -1;
|
||||||
if (rname.equals("shared clients"))
|
if (rname.equals(xsc))
|
||||||
return 1;
|
return 1;
|
||||||
return Collator.getInstance().compare(lname, rname);
|
return Collator.getInstance().compare(lname, rname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** translate here so collation works above */
|
||||||
private String getName(Destination d) {
|
private String getName(Destination d) {
|
||||||
TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(d.calculateHash());
|
TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(d.calculateHash());
|
||||||
String name = (in != null ? in.getDestinationNickname() : null);
|
String name = (in != null ? in.getDestinationNickname() : null);
|
||||||
@ -416,6 +419,10 @@ public class SummaryHelper extends HelperBase {
|
|||||||
name = (out != null ? out.getDestinationNickname() : null);
|
name = (out != null ? out.getDestinationNickname() : null);
|
||||||
if (name == null)
|
if (name == null)
|
||||||
name = d.calculateHash().toBase64().substring(0,6);
|
name = d.calculateHash().toBase64().substring(0,6);
|
||||||
|
else
|
||||||
|
name = _(name);
|
||||||
|
} else {
|
||||||
|
name = _(name);
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -50,13 +50,14 @@ public class TunnelRenderer {
|
|||||||
TunnelPool outPool = null;
|
TunnelPool outPool = null;
|
||||||
in = clientInboundPools.get(client);
|
in = clientInboundPools.get(client);
|
||||||
outPool = clientOutboundPools.get(client);
|
outPool = clientOutboundPools.get(client);
|
||||||
|
// TODO the following code is duplicated in SummaryHelper
|
||||||
String name = (in != null ? in.getSettings().getDestinationNickname() : null);
|
String name = (in != null ? in.getSettings().getDestinationNickname() : null);
|
||||||
if ( (name == null) && (outPool != null) )
|
if ( (name == null) && (outPool != null) )
|
||||||
name = outPool.getSettings().getDestinationNickname();
|
name = outPool.getSettings().getDestinationNickname();
|
||||||
if (name == null)
|
if (name == null)
|
||||||
name = client.toBase64().substring(0,4);
|
name = client.toBase64().substring(0,4);
|
||||||
out.write("<h2><a name=\"" + client.toBase64().substring(0,4)
|
out.write("<h2><a name=\"" + client.toBase64().substring(0,4)
|
||||||
+ "\" ></a>" + _("Client tunnels for") + " " + name);
|
+ "\" ></a>" + _("Client tunnels for") + ' ' + _(name));
|
||||||
if (_context.clientManager().isLocal(client))
|
if (_context.clientManager().isLocal(client))
|
||||||
out.write(" (<a href=\"/configtunnels.jsp#" + client.toBase64().substring(0,4) +"\">" + _("config") + "</a>):</h2>\n");
|
out.write(" (<a href=\"/configtunnels.jsp#" + client.toBase64().substring(0,4) +"\">" + _("config") + "</a>):</h2>\n");
|
||||||
else
|
else
|
||||||
@ -68,7 +69,7 @@ public class TunnelRenderer {
|
|||||||
Collections.sort(participating, new TunnelComparator());
|
Collections.sort(participating, new TunnelComparator());
|
||||||
out.write("<h2><a name=\"participating\"></a>" + _("Participating tunnels") + ":</h2><table>\n");
|
out.write("<h2><a name=\"participating\"></a>" + _("Participating tunnels") + ":</h2><table>\n");
|
||||||
out.write("<tr><th>" + _("Receive on") + "</th><th>" + _("From") + "</th><th>"
|
out.write("<tr><th>" + _("Receive on") + "</th><th>" + _("From") + "</th><th>"
|
||||||
+ "" + _("Send on") + "</th><th>" + _("To") + "</th><th>" + _("Expiration") + "</th>"
|
+ _("Send on") + "</th><th>" + _("To") + "</th><th>" + _("Expiration") + "</th>"
|
||||||
+ "<th>" + _("Usage") + "</th><th>" + _("Rate") + "</th><th>" + _("Role") + "</th></tr>\n");
|
+ "<th>" + _("Usage") + "</th><th>" + _("Rate") + "</th><th>" + _("Role") + "</th></tr>\n");
|
||||||
long processed = 0;
|
long processed = 0;
|
||||||
RateStat rs = _context.statManager().getRate("tunnel.participatingMessageCount");
|
RateStat rs = _context.statManager().getRate("tunnel.participatingMessageCount");
|
||||||
|
@ -25,5 +25,15 @@ class Dummy {
|
|||||||
_("My eepsite web server");
|
_("My eepsite web server");
|
||||||
_("Browser launch at startup");
|
_("Browser launch at startup");
|
||||||
_("BOB application bridge");
|
_("BOB application bridge");
|
||||||
|
|
||||||
|
// tunnel nicknames, taken from i2ptunnel.config so they will display
|
||||||
|
// nicely under 'local destinations' in the summary bar
|
||||||
|
// note that if the wording changes in i2ptunnel.config, we have to
|
||||||
|
// keep the old string here as well for existing installs
|
||||||
|
_("shared clients");
|
||||||
|
_("IRC proxy");
|
||||||
|
_("eepsite");
|
||||||
|
// hardcoded in i2psnark
|
||||||
|
_("I2PSnark");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,11 +58,11 @@
|
|||||||
<target name="builddepSmall">
|
<target name="builddepSmall">
|
||||||
<ant dir="core/java/" target="jar" />
|
<ant dir="core/java/" target="jar" />
|
||||||
<ant dir="router/java/" target="jar" />
|
<ant dir="router/java/" target="jar" />
|
||||||
|
<ant dir="apps/systray/java/" target="jar" />
|
||||||
|
<ant dir="apps/routerconsole/java/" target="jar" />
|
||||||
<ant dir="apps/ministreaming/java/" target="jar" />
|
<ant dir="apps/ministreaming/java/" target="jar" />
|
||||||
<ant dir="apps/streaming/java/" target="jar" />
|
<ant dir="apps/streaming/java/" target="jar" />
|
||||||
<ant dir="apps/i2ptunnel/java/" target="jar" />
|
<ant dir="apps/i2ptunnel/java/" target="jar" />
|
||||||
<ant dir="apps/systray/java/" target="jar" />
|
|
||||||
<ant dir="apps/routerconsole/java/" target="jar" />
|
|
||||||
<ant dir="apps/addressbook/" target="war" />
|
<ant dir="apps/addressbook/" target="war" />
|
||||||
</target>
|
</target>
|
||||||
<target name="buildrouter">
|
<target name="buildrouter">
|
||||||
|
@ -8,6 +8,7 @@ import java.io.IOException;
|
|||||||
import java.io.SequenceInputStream;
|
import java.io.SequenceInputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import net.i2p.CoreVersion;
|
import net.i2p.CoreVersion;
|
||||||
@ -183,43 +184,51 @@ D8usM7Dxp5yrDrCYZ5AIijc=
|
|||||||
* version, otherwise <code>false</code>.
|
* version, otherwise <code>false</code>.
|
||||||
*/
|
*/
|
||||||
public static final boolean needsUpdate(String currentVersion, String newVersion) {
|
public static final boolean needsUpdate(String currentVersion, String newVersion) {
|
||||||
StringTokenizer newVersionTokens = new StringTokenizer(sanitize(newVersion), ".");
|
return (new VersionComparator()).compare(currentVersion, newVersion) < 0;
|
||||||
StringTokenizer currentVersionTokens = new StringTokenizer(sanitize(currentVersion), ".");
|
|
||||||
|
|
||||||
while (newVersionTokens.hasMoreTokens() && currentVersionTokens.hasMoreTokens()) {
|
|
||||||
String newNumber = newVersionTokens.nextToken();
|
|
||||||
String currentNumber = currentVersionTokens.nextToken();
|
|
||||||
|
|
||||||
switch (compare(newNumber, currentNumber)) {
|
|
||||||
case -1: // newNumber is smaller
|
|
||||||
return false;
|
|
||||||
case 0: // eq
|
|
||||||
break;
|
|
||||||
case 1: // newNumber is larger
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newVersionTokens.hasMoreTokens() && !currentVersionTokens.hasMoreTokens())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int compare(String lop, String rop) {
|
/**
|
||||||
try {
|
* Compares versions.
|
||||||
int left = Integer.parseInt(lop);
|
* Characters other than [0-9.] are ignored.
|
||||||
int right = Integer.parseInt(rop);
|
*/
|
||||||
|
public static class VersionComparator implements Comparator<String> {
|
||||||
if (left < right)
|
/** l and r non-null */
|
||||||
return -1;
|
public int compare(String l, String r) {
|
||||||
else if (left == right)
|
// try it the easy way first
|
||||||
|
if (l.equals(r))
|
||||||
return 0;
|
return 0;
|
||||||
else
|
StringTokenizer lTokens = new StringTokenizer(sanitize(l), ".");
|
||||||
|
StringTokenizer rTokens = new StringTokenizer(sanitize(r), ".");
|
||||||
|
|
||||||
|
while (lTokens.hasMoreTokens() && rTokens.hasMoreTokens()) {
|
||||||
|
String lNumber = lTokens.nextToken();
|
||||||
|
String rNumber = rTokens.nextToken();
|
||||||
|
int diff = intCompare(lNumber, rNumber);
|
||||||
|
if (diff != 0)
|
||||||
|
return diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lTokens.hasMoreTokens() && !rTokens.hasMoreTokens())
|
||||||
return 1;
|
return 1;
|
||||||
} catch (NumberFormatException nfe) {
|
if (rTokens.hasMoreTokens() && !lTokens.hasMoreTokens())
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final int intCompare(String lop, String rop) {
|
||||||
|
int left, right;
|
||||||
|
try {
|
||||||
|
left = Integer.parseInt(lop);
|
||||||
|
} catch (NumberFormatException nfe) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
right = Integer.parseInt(rop);
|
||||||
|
} catch (NumberFormatException nfe) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return left - right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final void genKeysCLI(String publicKeyFile, String privateKeyFile) {
|
private static final void genKeysCLI(String publicKeyFile, String privateKeyFile) {
|
||||||
|
Reference in New Issue
Block a user