Skip to content

Commit

Permalink
Update J_I_PrintStream.java
Browse files Browse the repository at this point in the history
fix for if gets overwridden with a subclass
  • Loading branch information
wagyourtail authored Feb 1, 2025
1 parent 61a981c commit bf9223a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class J_I_PrintStream {

@Stub
public static Charset charset(PrintStream printStream) throws NoSuchFieldException, IllegalAccessException {
Field charOut = printStream.getClass().getField("charOut");
Field charOut = PrintStream.class.getField("charOut");
charOut.setAccessible(true);
OutputStreamWriter writer = (OutputStreamWriter) charOut.get(printStream);
String encoding = writer.getEncoding();
Expand Down

0 comments on commit bf9223a

Please sign in to comment.