You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ReplaceSystemOutWithIOPrint imports non-existing class java.io.IO #1115
What is the full stack trace of any errors you encountered?
import java.io.iO;
^
symbol: class iO
location: package java.io
Background information
The bug was introduced with #1093 because #1091 was too short-sighted.
The class in question used to be java.io.IO in JEP 477 and JEP 495 (both preview in Java 23 and 24, respectively). However, it was moved to java.lang.IO in the finalized JEP 512 in Java 25. Quote from https://openjdk.org/jeps/512:
The new IO class for basic console I/O is now in the java.lang package rather than the java.io package. Thus it is implicitly imported by every source file.
Thanks! @protocol7 any insights? Since you had logged #1091 originally.
Went back and double-checked our failure, and this was indeed an incorrect report from my side, sorry about that. Turns out we had a mix of Java versions, the same code was built with both Java 21 and 25. The rewrite happened on the 25 code, and then failed on 21.
Activity
timtebeek commentedon May 28, 2026
Thanks! @protocol7 any insights? Since you had logged #1091 originally.
protocol7 commentedon May 28, 2026
Went back and double-checked our failure, and this was indeed an incorrect report from my side, sorry about that. Turns out we had a mix of Java versions, the same code was built with both Java 21 and 25. The rewrite happened on the 25 code, and then failed on 21.
timtebeek commentedon May 28, 2026
That helps explain it, thanks!
Do not add `java.io.IO` import in `ReplaceSystemOutWithIOPrint` (open…