File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
javatests/com/google/re2j Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -547,10 +547,10 @@ private void testFowler(String file) throws IOException {
547547 // Field 5: optional comment appended to the report.
548548
549549 // Run test once for each specified capital letter mode that we support.
550- for (char c : flag .toCharArray () ) {
550+ for (int i = 0 ; i < flag .length (); i ++ ) {
551551 String pattern = field .get (1 );
552552 int flags = RE2 .POSIX | RE2 .CLASS_NL ;
553- switch (c ) {
553+ switch (flag . charAt ( i ) ) {
554554 default :
555555 continue ;
556556 case 'E' :
@@ -607,8 +607,8 @@ private void testFowler(String file) throws IOException {
607607 }
608608 // Convert int[] to List<Integer> and truncate to pos.length.
609609 List <Integer > have = new ArrayList <Integer >();
610- for (int i = 0 ; i < pos .size (); ++i ) {
611- have .add (haveArray [i ]);
610+ for (int j = 0 ; j < pos .size (); ++j ) {
611+ have .add (haveArray [j ]);
612612 }
613613 if (!have .equals (pos )) {
614614 System .err .format (
@@ -631,7 +631,6 @@ private void testFowler(String file) throws IOException {
631631
632632 private static List <Integer > parseFowlerResult (String s , boolean [] shouldCompileMatch )
633633 throws RuntimeException {
634- String olds = s ;
635634 // Field 4: the test outcome. This is either one of the posix error
636635 // codes (with REG_ omitted) or the match array, a list of (m,n)
637636 // entries with m and n being first and last+1 positions in the
You can’t perform that action at this time.
0 commit comments