Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate StringTokenizer #488

Open
delanym opened this issue May 27, 2024 · 1 comment
Open

Migrate StringTokenizer #488

delanym opened this issue May 27, 2024 · 1 comment
Labels
recipe Recipe requested

Comments

@delanym
Copy link

delanym commented May 27, 2024

StringTokenizer is a legacy class and can be replaced entirely with String.split

StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead.
https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/StringTokenizer.html

@timtebeek timtebeek transferred this issue from openrewrite/rewrite May 27, 2024
@timtebeek
Copy link
Contributor

Thanks for the suggestion @delanym ; I've moved this to rewrite-migrate-java, as that's where we also have other recipes that adopt features added in later Java versions. I see some usage examples here, which could help shape any recipe implementation and tests.

@timtebeek timtebeek added the recipe Recipe requested label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe requested
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants