diff --git a/java/com/google/re2j/Matcher.java b/java/com/google/re2j/Matcher.java index 96d932a7..678186d0 100644 --- a/java/com/google/re2j/Matcher.java +++ b/java/com/google/re2j/Matcher.java @@ -213,7 +213,6 @@ public int end(String group) { return end(g); } - /** * Returns the program size of this pattern. * diff --git a/javatests/com/google/re2j/ApiTestUtils.java b/javatests/com/google/re2j/ApiTestUtils.java index de0d9d0e..b38b656d 100644 --- a/javatests/com/google/re2j/ApiTestUtils.java +++ b/javatests/com/google/re2j/ApiTestUtils.java @@ -169,12 +169,15 @@ public static void testProgramSize(String pattern, int expectedSize) { Matcher m2 = p.matcher(inputBytes); Truth.assertWithMessage("Pattern(\"%s\") program size", p) - .that(p.programSize()).isEqualTo(expectedSize); + .that(p.programSize()) + .isEqualTo(expectedSize); Truth.assertWithMessage("Matcher(\"%s\", \"%s\") program size", m1.pattern(), input) - .that(m1.programSize()).isEqualTo(expectedSize); - Truth.assertWithMessage("Matcher(\"%s\", %s) program size", m2.pattern(), - Arrays.toString(inputBytes)) - .that(m2.programSize()).isEqualTo(expectedSize); + .that(m1.programSize()) + .isEqualTo(expectedSize); + Truth.assertWithMessage( + "Matcher(\"%s\", %s) program size", m2.pattern(), Arrays.toString(inputBytes)) + .that(m2.programSize()) + .isEqualTo(expectedSize); } public static void testGroup(String text, String regexp, String[] output) { diff --git a/javatests/com/google/re2j/MatcherTest.java b/javatests/com/google/re2j/MatcherTest.java index 43272b95..4f24ae2e 100644 --- a/javatests/com/google/re2j/MatcherTest.java +++ b/javatests/com/google/re2j/MatcherTest.java @@ -102,9 +102,11 @@ public void testProgramSize() { int programSize = pattern.programSize(); Truth.assertWithMessage("Pattern program size").that(programSize).isGreaterThan(1); Truth.assertWithMessage("Positive matcher program size") - .that(pattern.matcher("good").programSize()).isEqualTo(programSize); + .that(pattern.matcher("good").programSize()) + .isEqualTo(programSize); Truth.assertWithMessage("Negative matcher program size") - .that(pattern.matcher("bad").programSize()).isEqualTo(programSize); + .that(pattern.matcher("bad").programSize()) + .isEqualTo(programSize); } @Test