Index: PrintStream.java =================================================================== --- PrintStream.java (revision 431574) +++ PrintStream.java (working copy) @@ -117,7 +117,7 @@ public PrintStream(OutputStream out, boolean autoflush, String enc) throws UnsupportedEncodingException { super(out); - if (out == null) { + if (out == null || enc == null) { throw new NullPointerException(); } this.autoflush = autoflush;