rewrite-migrate-java icon indicating copy to clipboard operation
rewrite-migrate-java copied to clipboard

Migrate StringTokenizer

Open delanym opened this issue 1 year ago • 1 comments

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

delanym avatar May 27 '24 12:05 delanym

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 avatar May 27 '24 12:05 timtebeek