commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [5/8] [lang] Inline unnecessary local methods
Date Mon, 04 May 2015 19:47:20 GMT
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 <britter@apache.org>
Authored: Mon May 4 21:37:51 2015 +0200
Committer: Benedikt Ritter <britter@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);
-    }
 }


Mime
View raw message