This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Patch: java.util.zip.InfalterInputStream
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 19 Jun 2003 16:49:40 +0200
- Subject: FYI: Patch: java.util.zip.InfalterInputStream
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I commited the attached patch to make InflaterInputStream throwing a
NullPointerException if in is null (like JRE does).
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+8c2EWSOgCCdjSDsRAvdaAJ9uBtlda4LYscuk2n48kyh3OGUI2wCggjW/
VFec4ccxKQuNdpO/7P1fmAk=
=Hqo5
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1965
diff -u -b -B -r1.1965 ChangeLog
--- ChangeLog 19 Jun 2003 10:48:40 -0000 1.1965
+++ ChangeLog 19 Jun 2003 14:43:31 -0000
@@ -1,5 +1,11 @@
2003-06-19 Michael Koch <konqueror@gmx.de>
+ * java/util/zip/InflaterInputStream.java
+ (InflaterInputStream): Throw NullPointerException if in is null (as
+ JDK does).
+
+2003-06-19 Michael Koch <konqueror@gmx.de>
+
* java/awt/Font.java
javax/swing/UIManager.java
javax/swing/border/AbstractBorder.java
Index: java/util/zip/InflaterInputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/zip/InflaterInputStream.java,v
retrieving revision 1.15
diff -u -b -B -r1.15 InflaterInputStream.java
--- java/util/zip/InflaterInputStream.java 13 Feb 2003 23:15:20 -0000 1.15
+++ java/util/zip/InflaterInputStream.java 19 Jun 2003 14:43:31 -0000
@@ -73,6 +73,10 @@
public InflaterInputStream (InputStream in, Inflater infl, int bufsize)
{
super (in);
+
+ if (in == null)
+ throw new NullPointerException();
+
this.inf = infl;
this.buf = new byte[bufsize];
}