commit | 229514ecee1ff970ae1d1b5446ee84b8aa226d31 | [log] [tgz] |
---|---|---|
author | Hector Oswaldo Caballero <hector.caballero@ericsson.com> | Fri Dec 15 18:33:30 2017 -0500 |
committer | Hector Oswaldo Caballero <hector.caballero@ericsson.com> | Sat Dec 16 04:42:19 2017 -0500 |
tree | 04f2d85dc44732ed6ef19a9163150a7f718f39b4 | |
parent | abda219af4a04c193d5f7aea5f17f80a6c198dbd [diff] |
Simplify ActionRequest Change-Id: If542b9b130cc5906d81623c99cccba9cc4b72f27
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/ActionRequest.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/ActionRequest.java index dec671e..964c01d 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/ActionRequest.java +++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/ActionRequest.java
@@ -49,11 +49,7 @@ * @return The name of the requested action, if a name has been given. "" otherwise. */ public String getName() { - String ret = ""; - if (chopped.length > 0) { - ret = chopped[0]; - } - return ret; + return getParameter(0); } /** @@ -63,11 +59,7 @@ * @return The name of the requested parameter, if the requested parameter exists. "" otherwise. */ public String getParameter(int i) { - String ret = ""; - if (chopped.length > i) { - ret = chopped[i]; - } - return ret; + return chopped.length > i ? chopped[i] : ""; } /**