Skip to content

Incorrect separator in SparseFieldSetExpression.ToFullString #1779

@bkoelman

Description

@bkoelman

In SparseFieldSetExpression.cs:

public override string ToString()
{
    return string.Join(",", Fields.Select(field => field.PublicName).OrderBy(name => name));
}

public override string ToFullString()
{
    return string.Join(".", Fields.Select(field => $"{field.Type.PublicName}:{field.PublicName}").OrderBy(name => name));
}

ToFullString incorrectly joins the fields in the set with a .; it should use a , instead.

Furthermore, we could use the overload of string.Join that takes a char as the separator, instead of string. There are additional places in the codebase where this optimization can be applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions