Preconditions.checkNotNull
recipes should retain unrelated String.valueOf(String)
#575
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's changed?
String.valueOf(String) and the String itself are not equivalent, especially when the value of the String is null. When the String is null, String.valueOf(String) returns the literal "null", whereas directly referencing the String would result in a null value.
Also the intended purpose of recipe (String.ofValue) was to only update the expressions which was previously updated by "PreconditionsCheckNotNullWithMessageToObjectsRequireNonNull", in such case adding a marker to the expression and then selectively updating the marked expression is desired but it seems difficult to do with refasterstyle templates.
So deleted the refaster template for this conversion.
Checklist