Uploaded image for project: 'Commons CSV'
  1. Commons CSV
  2. CSV-271

Missing separator with "print(object)" followed by "printRecord(Object[])"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Printer
    • Labels:
      None

      Description

      Hello,

      the following code produces CSV with a missing separator:

      CSVPrinter csv=new CSVPrinter(new OutputStreamWriter(System.out,StandardCharsets.UTF_8),CSVFormat.DEFAULT);
      
      csv.print("a");
      csv.printRecord("b","c");

      This produces "ab,c".

      The corresponding function that takes a list, works properly:

      csv.print("a");
      csv.printRecord(Arrays.asList("b","c"));

      Produces "a,b,c" as expected

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michael@wyraz.de Michael Wyraz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h