forked from I2P_Developers/i2p.i2p
Console: _action cannot be null in processForm()
GraphHelper minor cleanup
This commit is contained in:
@ -228,8 +228,6 @@ public class ConfigServiceHandler extends FormHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void processForm() {
|
protected void processForm() {
|
||||||
if (_action == null) return;
|
|
||||||
|
|
||||||
if (_t("Shutdown gracefully").equals(_action)) {
|
if (_t("Shutdown gracefully").equals(_action)) {
|
||||||
if (_context.hasWrapper())
|
if (_context.hasWrapper())
|
||||||
registerWrapperNotifier(Router.EXIT_GRACEFUL, false);
|
registerWrapperNotifier(Router.EXIT_GRACEFUL, false);
|
||||||
|
@ -157,8 +157,6 @@ public class ConfigUpdateHandler extends FormHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void processForm() {
|
protected void processForm() {
|
||||||
if (_action == null)
|
|
||||||
return;
|
|
||||||
if (_action.equals(_t("Check for updates"))) {
|
if (_action.equals(_t("Check for updates"))) {
|
||||||
ConsoleUpdateManager mgr = UpdateHandler.updateManager(_context);
|
ConsoleUpdateManager mgr = UpdateHandler.updateManager(_context);
|
||||||
if (mgr == null) {
|
if (mgr == null) {
|
||||||
|
@ -130,6 +130,7 @@ public abstract class FormHandler {
|
|||||||
* Implement this to perform the final processing (in turn, adding formNotice
|
* Implement this to perform the final processing (in turn, adding formNotice
|
||||||
* and formError messages, etc)
|
* and formError messages, etc)
|
||||||
*
|
*
|
||||||
|
* Will only be called if _action is non-null and the nonce is valid.
|
||||||
*/
|
*/
|
||||||
protected abstract void processForm();
|
protected abstract void processForm();
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ public class ConfigHomeHandler extends FormHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void processForm() {
|
protected void processForm() {
|
||||||
if (_action == null) return;
|
|
||||||
String group = getJettyString("group");
|
String group = getJettyString("group");
|
||||||
boolean deleting = _action.equals(_t("Delete selected"));
|
boolean deleting = _action.equals(_t("Delete selected"));
|
||||||
boolean adding = _action.equals(_t("Add item"));
|
boolean adding = _action.equals(_t("Add item"));
|
||||||
|
@ -15,7 +15,6 @@ public class ConfigKeyringHandler extends FormHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void processForm() {
|
protected void processForm() {
|
||||||
if (_action == null) return;
|
|
||||||
boolean adding = _action.equals(_t("Add key"));
|
boolean adding = _action.equals(_t("Add key"));
|
||||||
if (adding || _action.equals(_t("Delete key"))) {
|
if (adding || _action.equals(_t("Delete key"))) {
|
||||||
if (_peer == null)
|
if (_peer == null)
|
||||||
|
@ -20,7 +20,6 @@ public class ConfigSummaryHandler extends FormHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void processForm() {
|
protected void processForm() {
|
||||||
if (_action == null) return;
|
|
||||||
String group = getJettyString("group");
|
String group = getJettyString("group");
|
||||||
boolean deleting = _action.equals(_t("Delete selected"));
|
boolean deleting = _action.equals(_t("Delete selected"));
|
||||||
boolean adding = _action.equals(_t("Add item"));
|
boolean adding = _action.equals(_t("Add item"));
|
||||||
|
@ -395,10 +395,10 @@ public class GraphHelper extends FormHandler {
|
|||||||
for (int i = 0; i < times.length; i++) {
|
for (int i = 0; i < times.length; i++) {
|
||||||
_out.write("<option value=\"");
|
_out.write("<option value=\"");
|
||||||
_out.write(Integer.toString(times[i]));
|
_out.write(Integer.toString(times[i]));
|
||||||
_out.write("\"");
|
_out.write('"');
|
||||||
if (times[i] == _refreshDelaySeconds)
|
if (times[i] == _refreshDelaySeconds)
|
||||||
_out.write(" selected=\"selected\"");
|
_out.write(" selected=\"selected\"");
|
||||||
_out.write(">");
|
_out.write('>');
|
||||||
if (times[i] > 0)
|
if (times[i] > 0)
|
||||||
_out.write(DataHelper.formatDuration2(times[i] * 1000));
|
_out.write(DataHelper.formatDuration2(times[i] * 1000));
|
||||||
else
|
else
|
||||||
|
@ -28,8 +28,6 @@ public class WizardHandler extends FormHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void processForm() {
|
protected void processForm() {
|
||||||
if (_action == null)
|
|
||||||
return;
|
|
||||||
if (getJettyString("cancelbw") != null) {
|
if (getJettyString("cancelbw") != null) {
|
||||||
cancelNDT();
|
cancelNDT();
|
||||||
for (int i = 0; i < 20 && !_helper.isNDTComplete(); i++) {
|
for (int i = 0; i < 20 && !_helper.isNDTComplete(); i++) {
|
||||||
|
Reference in New Issue
Block a user