Skip to content

Added missed IOException to Reader.read(char[] buf) and Reader.read(c… - #9933

Merged
niloc132 merged 3 commits into
gwtproject:mainfrom
treblereel:Reader_must_throw_IOException
Jul 30, 2024
Merged

niloc132 merged 3 commits into
gwtproject:mainfrom
treblereel:Reader_must_throw_IOException

Conversation

@treblereel

Copy link
Copy Markdown
Contributor

…har[] buf, int off, int len) methods

Fixes #9915

@niloc132

niloc132 commented Mar 5, 2024

Copy link
Copy Markdown
Member

To land this, we're going to need to mark these as technically API-breaking changes in 2.12 - it is possible that someone was relying on them not throwing these exceptions and so was skipping the try/catch.

First though we need to generate a 2.11 reference jar, so we can see what changes might happen, I'll get that fixed soon.

@treblereel

Copy link
Copy Markdown
Contributor Author

@niloc132 It's not worth it! Let's close this PR,

@niloc132

niloc132 commented Mar 6, 2024

Copy link
Copy Markdown
Member

No, that work should happen anyway, I'll get it done by the end of the week.

@niloc132 niloc132 added this to the 2.12 milestone May 11, 2024
@niloc132

Copy link
Copy Markdown
Member

Once #9982 merges, we can finish this finally - after that lands, merge with main, and make this change to fix CI:

diff --git a/tools/api-checker/config/gwt211_212userapi.conf b/tools/api-checker/config/gwt211_212userapi.conf
index 1279e029d8..ecd503d03d 100644
--- a/tools/api-checker/config/gwt211_212userapi.conf
+++ b/tools/api-checker/config/gwt211_212userapi.conf
@@ -149,4 +149,8 @@ excludedPackages com.google.gwt.core.client.impl\
 ##############################################
 #Api  whitelist
 # when adding to the white-list, include comments as to why the addition is
-# being made.
\ No newline at end of file
+# being made.
+
+# java.io.Reader missing IOException throws for read methods
+java.io.Reader::read([C) OVERRIDABLE_METHOD_EXCEPTION_TYPE_CHANGE new method has more exceptions: [Ljava/io/IOException;]
+java.io.Reader::read([CII) OVERRIDABLE_METHOD_EXCEPTION_TYPE_CHANGE new method has more exceptions: [Ljava/io/IOException;]

@niloc132
niloc132 merged commit 7f42724 into gwtproject:main Jul 30, 2024
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.

java.io.Reader.read(char[] buf/char[] buf, int off, int len) must throw IOException

2 participants