Mercurial Hosting > luan
diff src/goodjava/json/JsonToString.java @ 1485:6a24c8b33d6b
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 01 May 2020 11:23:29 -0600 |
parents | 509736ad42e6 |
children | f989778ca9e1 |
line wrap: on
line diff
--- a/src/goodjava/json/JsonToString.java Sat Apr 25 11:14:25 2020 -0600 +++ b/src/goodjava/json/JsonToString.java Fri May 01 11:23:29 2020 -0600 @@ -121,7 +121,8 @@ if( !list.isEmpty() ) { indent(sb,indented+1); toString(list.get(0),sb,indented+1); - for( int i=1; i<list.size(); i++ ) { + final int n = list.size(); + for( int i=1; i<n; i++ ) { sb.append(comma); toString(list.get(i),sb,indented+1); }