This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-text.git
The following commit(s) were added to refs/heads/master by this push: new 34ce3a4 Checkstyle. 34ce3a4 is described below commit 34ce3a459d82a2a96303c072c7b7b5823601de2d Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Jun 28 18:22:25 2020 -0400 Checkstyle. --- .../apache/commons/text/TextStringBuilderTest.java | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/test/java/org/apache/commons/text/TextStringBuilderTest.java b/src/test/java/org/apache/commons/text/TextStringBuilderTest.java index efa0026..7734561 100644 --- a/src/test/java/org/apache/commons/text/TextStringBuilderTest.java +++ b/src/test/java/org/apache/commons/text/TextStringBuilderTest.java @@ -678,19 +678,18 @@ public class TextStringBuilderTest { @Test public void testDeleteCharAt() { final String str = "abc"; - { - final TextStringBuilder sb = new TextStringBuilder(str); - sb.deleteCharAt(0); - assertEquals("bc", sb.toString()); - } - { - final TextStringBuilder sb = new TextStringBuilder(str); - sb.deleteCharAt(str.length() - 1); - assertEquals("ab", sb.toString()); - } + // + final TextStringBuilder sb1 = new TextStringBuilder(str); + sb1.deleteCharAt(0); + assertEquals("bc", sb1.toString()); + // final TextStringBuilder sb2 = new TextStringBuilder(str); - assertThrows(IndexOutOfBoundsException.class, () -> sb2.deleteCharAt(str.length())); - assertThrows(IndexOutOfBoundsException.class, () -> sb2.deleteCharAt(1000)); + sb2.deleteCharAt(str.length() - 1); + assertEquals("ab", sb2.toString()); + // + final TextStringBuilder sb3 = new TextStringBuilder(str); + assertThrows(IndexOutOfBoundsException.class, () -> sb3.deleteCharAt(str.length())); + assertThrows(IndexOutOfBoundsException.class, () -> sb3.deleteCharAt(1000)); } @Test