diff options
author | rbuj <robert.buj@gmail.com> | 2014-09-07 17:43:22 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-09-08 03:00:25 -0500 |
commit | 34a68f0aa92de05123c1e951899c08eed5a55543 (patch) | |
tree | 9e4ef6bac292e4d3ee42ce6e1670242a54fa3939 /qadevOOo | |
parent | c9dbe53a4a3ccd4ad85354322e63c9e92c1c0dda (diff) |
qadevOOo: reuse the value of entryName.indexOf(Left Parenthesis)
Change-Id: I1950275af2a063db74fef326ac0dd4e555e5170d
Reviewed-on: https://gerrit.libreoffice.org/11323
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/complexlib/ComplexTestCase.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java b/qadevOOo/runner/complexlib/ComplexTestCase.java index 7eacef28338e..8d39b7c7a492 100644 --- a/qadevOOo/runner/complexlib/ComplexTestCase.java +++ b/qadevOOo/runner/complexlib/ComplexTestCase.java @@ -119,12 +119,13 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest String entryName = subEntry.entryName; Object[] parameter = null; - if (entryName.indexOf("(") != -1) + int posLeftParenthesis = entryName.indexOf("("); + if (posLeftParenthesis != -1) { - String sParameter = (entryName.substring(entryName.indexOf("(") + 1, entryName.indexOf(")"))); + String sParameter = (entryName.substring(posLeftParenthesis + 1, entryName.indexOf(")"))); mTestMethodName = entryName; parameter = new String[] { sParameter }; - entryName = entryName.substring(0, entryName.indexOf("(")); + entryName = entryName.substring(0, posLeftParenthesis); testMethod = this.getClass().getMethod(entryName, new Class[] { String.class }); } else |