@@ -285,8 +285,8 @@ public void readLine(String tagLine) {
285285
286286 String [] args ;
287287 if (signature != null && !signature .equals ("()" ) &&
288- !signature .startsWith ("() " ) && (args =
289- splitSignature (signature )) != null ) {
288+ !signature .startsWith ("() " ) && (args =
289+ splitSignature (signature )) != null ) {
290290 for (String arg : args ) {
291291 //TODO this algorithm assumes that data types occur to
292292 // the left of the argument name, so it will not
@@ -312,7 +312,9 @@ public void readLine(String tagLine) {
312312 arg = a [0 ]; // throws away assigned value
313313 }
314314 arg = arg .trim ();
315- if (arg .length () < 1 ) continue ;
315+ if (arg .length () < 1 ) {
316+ continue ;
317+ }
316318
317319 cidx = bestIndexOfArg (lineno , whole , arg );
318320
@@ -398,7 +400,9 @@ private void addTag(Definitions defs, int lineno, String symbol,
398400 private CpatIndex bestIndexOfTag (int lineno , String whole ,
399401 String str ) {
400402
401- if (whole .length () < 1 ) return new CpatIndex (lineno , 0 , 1 , true );
403+ if (whole .length () < 1 ) {
404+ return new CpatIndex (lineno , 0 , 1 , true );
405+ }
402406 String origWhole = whole ;
403407
404408 int t = tabSize ;
@@ -456,14 +460,18 @@ private CpatIndex bestIndexOfTag(int lineno, String whole,
456460 * @return a defined instance
457461 */
458462 private CpatIndex bestIndexOfArg (int lineno , String whole , String arg ) {
459- if (whole .length () < 1 ) return new CpatIndex (lineno , 0 , 1 , true );
463+ if (whole .length () < 1 ) {
464+ return new CpatIndex (lineno , 0 , 1 , true );
465+ }
460466
461467 int t = tabSize ;
462468 int s , e ;
463469
464470 // First search arg as-is in the current `whole' -- strict then lax.
465471 int woff = strictIndexOf (whole , arg );
466- if (woff < 0 ) woff = whole .indexOf (arg );
472+ if (woff < 0 ) {
473+ woff = whole .indexOf (arg );
474+ }
467475 if (woff >= 0 ) {
468476 s = ExpandTabsReader .translate (whole , woff , t );
469477 e = ExpandTabsReader .translate (whole , woff + arg .length (), t );
@@ -532,7 +540,9 @@ private CpatIndex bestIndexOfArg(int lineno, String whole, String arg) {
532540 }
533541 } else {
534542 pr = bestMatch (cut , arg , argpat );
535- if (pr .start >= 0 ) return bestLineOfMatch (lineno , pr , cut );
543+ if (pr .start >= 0 ) {
544+ return bestLineOfMatch (lineno , pr , cut );
545+ }
536546 }
537547
538548 /**
@@ -549,7 +559,9 @@ private CpatIndex bestIndexOfArg(int lineno, String whole, String arg) {
549559 */
550560 private PatResult bestMatch (String whole , String arg , Pattern argpat ) {
551561 PatResult m = strictMatch (whole , arg , argpat );
552- if (m .start >= 0 ) return m ;
562+ if (m .start >= 0 ) {
563+ return m ;
564+ }
553565 Matcher marg = argpat .matcher (whole );
554566 if (marg .find ()) {
555567 return new PatResult (marg .start (), marg .end (), marg .group ());
@@ -573,7 +585,9 @@ private int strictIndexOf(String whole, String substr) {
573585 int spos = 0 ;
574586 do {
575587 int woff = whole .indexOf (substr , spos );
576- if (woff < 0 ) return -1 ;
588+ if (woff < 0 ) {
589+ return -1 ;
590+ }
577591
578592 spos = woff + 1 ;
579593 String onechar ;
@@ -718,11 +732,11 @@ private static String[] splitSignature(String signature) {
718732
719733 // Trim outer punctuation if it exists.
720734 while (soff < signature .length () && (signature .charAt (soff ) == '(' ||
721- signature .charAt (soff ) == '{' )) {
735+ signature .charAt (soff ) == '{' )) {
722736 ++soff ;
723737 }
724738 while (eoff - 1 > soff && (signature .charAt (eoff - 1 ) == ')' ||
725- signature .charAt (eoff - 1 ) == '}' )) {
739+ signature .charAt (eoff - 1 ) == '}' )) {
726740 --eoff ;
727741 }
728742 if (soff > off0 || eoff < offz ) {
@@ -738,15 +752,19 @@ private static String[] splitSignature(String signature) {
738752 */
739753 private String trySplitterCut (int lineOffset , int maxLines ) {
740754 if (splitter == null ) {
741- if (splitterSupplier == null || triedSplitterSupplier ) return null ;
755+ if (splitterSupplier == null || triedSplitterSupplier ) {
756+ return null ;
757+ }
742758 triedSplitterSupplier = true ;
743759 splitter = splitterSupplier .get ();
744- if (splitter == null ) return null ;
760+ if (splitter == null ) {
761+ return null ;
762+ }
745763 }
746764
747765 StringBuilder cutbld = new StringBuilder ();
748766 for (int i = lineOffset ; i < lineOffset + maxLines &&
749- i < splitter .count (); ++i ) {
767+ i < splitter .count (); ++i ) {
750768 cutbld .append (splitter .getLine (i ));
751769 }
752770 return cutbld .toString ();
0 commit comments