|
25 | 25 | import java.nio.file.Path; |
26 | 26 | import java.util.ArrayList; |
27 | 27 | import java.util.Arrays; |
| 28 | +import java.util.Collections; |
28 | 29 | import java.util.Enumeration; |
29 | 30 | import java.util.List; |
30 | 31 | import java.util.Locale; |
|
39 | 40 | import org.apache.commons.cli.Options; |
40 | 41 | import org.apache.commons.cli.ParseException; |
41 | 42 | import org.apache.commons.cli.help.HelpFormatter; |
| 43 | +import org.apache.commons.cli.help.TableDefinition; |
42 | 44 | import org.apache.commons.cli.help.TextHelpAppendable; |
43 | 45 | import org.apache.solr.client.solrj.SolrClient; |
44 | 46 | import org.apache.solr.client.solrj.request.ContentStreamUpdateRequest; |
@@ -316,16 +318,14 @@ public static HelpFormatter getFormatter() { |
316 | 318 | TextHelpAppendable helpAppendable = |
317 | 319 | new TextHelpAppendable(System.out) { |
318 | 320 | @Override |
319 | | - public void appendTable(org.apache.commons.cli.help.TableDefinition table) |
320 | | - throws IOException { |
| 321 | + public void appendTable(TableDefinition table) throws IOException { |
321 | 322 | if (table == null) { |
322 | 323 | return; |
323 | 324 | } |
324 | 325 | // Create a new TableDefinition with empty headers to suppress the header row |
325 | | - java.util.List<String> emptyHeaders = |
326 | | - java.util.Collections.nCopies(table.headers().size(), ""); |
327 | | - org.apache.commons.cli.help.TableDefinition noHeaderTable = |
328 | | - org.apache.commons.cli.help.TableDefinition.from( |
| 326 | + List<String> emptyHeaders = Collections.nCopies(table.headers().size(), ""); |
| 327 | + TableDefinition noHeaderTable = |
| 328 | + TableDefinition.from( |
329 | 329 | table.caption(), table.columnTextStyles(), emptyHeaders, table.rows()); |
330 | 330 | super.appendTable(noHeaderTable); |
331 | 331 | } |
|
0 commit comments