I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit aad80eb2 authored by zzz's avatar zzz
Browse files

Console: _action cannot be null in processForm()

GraphHelper minor cleanup
parent af49a903
No related branches found
No related tags found
No related merge requests found
...@@ -228,8 +228,6 @@ public class ConfigServiceHandler extends FormHandler { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment