Skip to content

needsQuoting in DelimiterWriter.write is determined incorrectly #54

@brentleeper

Description

@brentleeper

Currently:

final boolean needsQuoting = stringValue.indexOf(delimiter) != -1 //
|| foundQualifier //
|| stringValue.indexOf('\n') != -1;

Should be:

final boolean needsQuoting = foundQualifier && (stringValue.indexOf(delimiter) != 1 || stringValue.indexOf("\n") != 1);

Because:

If the qualifier is not found, then you cannot write the qualifier ever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions