You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2015/05/04 21:47:20 UTC
[5/8] [lang] Inline unnecessary local methods
Inline unnecessary local methods
Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/f175a241
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/f175a241
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/f175a241
Branch: refs/heads/master
Commit: f175a241c811d2d0843026b2dde5c3ae308cfb95
Parents: f24344c
Author: Benedikt Ritter <br...@apache.org>
Authored: Mon May 4 21:37:51 2015 +0200
Committer: Benedikt Ritter <br...@apache.org>
Committed: Mon May 4 21:37:51 2015 +0200
----------------------------------------------------------------------
...eflectionToStringBuilderExcludeWithAnnotationTest.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/f175a241/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
index f6b62bc..acf7c2c 100755
--- a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
@@ -46,17 +46,11 @@ public class ReflectionToStringBuilderExcludeWithAnnotationTest {
@Test
public void test_toStringExclude() {
final String toString = ReflectionToStringBuilder.toString(new TestFixture());
- this.validateSecretFieldAbsent(toString);
- }
- private void validateNonSecretField(final String toString) {
+ Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_FIELD));
+ Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_VALUE));
Assert.assertTrue(toString.indexOf(NOT_SECRET_FIELD) > ArrayUtils.INDEX_NOT_FOUND);
Assert.assertTrue(toString.indexOf(NOT_SECRET_VALUE) > ArrayUtils.INDEX_NOT_FOUND);
}
- private void validateSecretFieldAbsent(final String toString) {
- Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_FIELD));
- Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_VALUE));
- this.validateNonSecretField(toString);
- }
}