Skip to content

Should Bytes.toString really use getString? #7904

Description

@Simn

I know it has been like this for a while, but having an implicit conversion like this seems wrong to me. In the general case, the conversion does not lead to printable strings and printing is what toString is typically used for. There could be 0-chars in the middle which in the standard getString implementation truncate the string.

IMO the user should be explicit about such a conversion. A toString could act more like toHex instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions