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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8
    • 1.9.0
    • Printer
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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