harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r989807 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/libs/ classlib/modules/archive/src/main/java/java/util/zip/ classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ drlvm/ jdkt...
Date Thu, 26 Aug 2010 16:23:54 GMT
Author: hindessm
Date: Thu Aug 26 16:23:54 2010
New Revision: 989807

URL: http://svn.apache.org/viewvc?rev=989807&view=rev
Log:
Merge change from /harmony/enhanced/java/trunk@989780:

  r989780 | odeakin | 2010-08-26 16:49:52 +0100 (Thu, 26 Aug 2010) | 1 line
  
  Apply patch for HARMONY-6623 ([classlib][archive]Deflater.setlevel/setStrategy throws IllegalStateException
if inputBuffer is not null)


Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 26 16:23:54 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168
+/harmony/enhanced/java/trunk:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168,989780
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 26 16:23:54 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168
+/harmony/enhanced/java/trunk/classlib:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168,989780
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 26 16:23:54 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168,989780
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java?rev=989807&r1=989806&r2=989807&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java
Thu Aug 26 16:23:54 2010
@@ -451,9 +451,6 @@ public class Deflater {
         if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) {
             throw new IllegalArgumentException();
         }
-        if (inputBuffer != null) {
-            throw new IllegalStateException();
-        }
         compressLevel = level;
     }
 
@@ -472,9 +469,6 @@ public class Deflater {
         if (strategy < DEFAULT_STRATEGY || strategy > HUFFMAN_ONLY) {
             throw new IllegalArgumentException();
         }
-        if (inputBuffer != null) {
-            throw new IllegalStateException();
-        }
         this.strategy = strategy;
     }
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java?rev=989807&r1=989806&r2=989807&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
Thu Aug 26 16:23:54 2010
@@ -676,6 +676,22 @@ public class DeflaterTest extends TestCa
 			defl.end();
 		}
 
+        //test setLevel - Call after inputArray 
+        Deflater defl = new Deflater();
+        defl.setLevel(2);
+        outPutBuf = new byte[500];
+        defl.setInput(byteArray);
+        defl.setLevel(3);
+        while (!defl.needsInput()) {
+            defl.deflate(outPutBuf);
+        }
+        defl.finish();
+        while (!defl.finished()) {
+            defl.deflate(outPutBuf);
+        }
+        totalOut = defl.getTotalOut();
+        defl.end();
+
 		// testing boundaries
 		try {
 			Deflater boundDefl = new Deflater();
@@ -745,6 +761,21 @@ public class DeflaterTest extends TestCa
 			mdefl.end();
 		}
 
+		//Call setStrategy after setInput call
+        byte outPutBuf[] = new byte[500];
+        MyDeflater mdefl = new MyDeflater();
+        mdefl.setStrategy(mdefl.getDefStrategy());
+        mdefl.setInput(byteArray);
+        mdefl.setStrategy(mdefl.getHuffman());
+        while (!mdefl.needsInput()) {
+            mdefl.deflate(outPutBuf);
+        }
+        mdefl.finish();
+        while (!mdefl.finished()) {
+            mdefl.deflate(outPutBuf);
+        }
+        mdefl.end();
+
 		// Attempting to setStrategy to an invalid value
 		try {
 			Deflater defl = new Deflater();

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 26 16:23:54 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168
+/harmony/enhanced/java/trunk/drlvm:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168,989780
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 26 16:23:54 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168
+/harmony/enhanced/java/trunk/jdktools:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283,987285,987981,988045,989168,989780
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message