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

Deprecate Utility for removal #10083

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

niloc132
Copy link
Member

@niloc132 niloc132 commented Jan 9, 2025

This class is an odd mix of useful methods, and was used all over the code base. Many of the methods have a better way to implement them in modern Java (try-with-resources, InputStream.transferTo(), InputStream.readAllBytes(), java.nio utilities), and some had odd quirks or bugs (closing while writing a buffer file must be allowed to throw an error! don't double-buffer reads or writes!, especially when you're just pulling the results into memory anyway!).

Some methods have been moved to their own types, to be closer to their use and not effectively require every class have access to this same package - SourceLevel, LinkerUtils, and CommandLineCreatorUtils

Also modified CompilerTest and RecompilerTest to also avoid deprecated Guava Files.createTempDir(), Files.write(), etc in favor of java.nio.file.Files.

The class itself has been deprecated for removal, allowing downstream Generators/Linkers/etc time to update.

Fixes #10031

@niloc132 niloc132 added this to the 2.13 milestone Jan 9, 2025
@niloc132
Copy link
Member Author

niloc132 commented Jan 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate com.google.gwt.util.tools.Utility for removal
1 participant