Skip to content

Recipe to avoid concatenating with empty String to perform type conversion #628

@greg-at-moderne

Description

@greg-at-moderne

What problem are you trying to solve?

Code readability and possibly performance when using the "" + ... trick to convert something to a String.
String.valueOf() is a better alternative.

Describe the situation before applying the recipe

"" + 1

Describe the situation after applying the recipe

String.valueOf(1)

OSS repro

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions