harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r377723 - in /incubator/harmony/enhanced/classlib/trunk/modules/archive/src: main/java/java/util/zip/ test/java/org/apache/harmony/tests/java/util/zip/
Date Tue, 14 Feb 2006 13:34:36 GMT
Author: tellison
Date: Tue Feb 14 05:34:34 2006
New Revision: 377723

URL: http://svn.apache.org/viewcvs?rev=377723&view=rev
Log:
Fix for HARMONY-86 (java.util.zip.Inflater.needsDictionary() throws unspecified IllegalStateException)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterTest.java
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Inflater.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/AllTests.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Inflater.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Inflater.java?rev=377723&r1=377722&r2=377723&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Inflater.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Inflater.java
Tue Feb 14 05:34:34 2006
@@ -208,8 +208,6 @@
 	 * @see #setDictionary(byte[], int, int)
 	 */
 	public synchronized boolean needsDictionary() {
-		if (inputBuffer == null)
-			throw new IllegalStateException();
 		return needsDictionary;
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/AllTests.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/AllTests.java?rev=377723&r1=377722&r2=377723&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/AllTests.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/AllTests.java
Tue Feb 14 05:34:34 2006
@@ -28,7 +28,7 @@
 		TestSuite suite = new TestSuite(
 				"Test for org.apache.harmony.tests.java.util.zip");
 		//$JUnit-BEGIN$
-
+		suite.addTestSuite(InflaterTest.class);
 		//$JUnit-END$
 		return suite;
 	}

Added: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterTest.java?rev=377723&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterTest.java
Tue Feb 14 05:34:34 2006
@@ -0,0 +1,32 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.tests.java.util.zip;
+
+import java.util.zip.Inflater;
+
+import junit.framework.TestCase;
+
+public class InflaterTest extends TestCase {
+
+	/**
+	 * @tests java.util.zip.Inflater#needsDictionary()
+	 */
+    public void test_needsDictionary () {
+    	// Regression test for HARMONY-86
+        Inflater inf = new Inflater();
+        assertFalse(inf.needsDictionary());
+    } 
+}



Mime
View raw message