harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r440290 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio_char: build.xml src/main/java/java/nio/charset/CharsetEncoder.java src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
Date Tue, 05 Sep 2006 08:03:58 GMT
Author: pyang
Date: Tue Sep  5 01:03:57 2006
New Revision: 440290

URL: http://svn.apache.org/viewvc?view=rev&rev=440290
Log:
Patch applied for HARMONY-1379 ([classlib][nio_char] CharsetEncoder.encode(CharBuffer in)
doesn't throw expected MalformedInputException when encodeLoop returns malformed coder result
and report flag is enabled.)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/build.xml?view=diff&rev=440290&r1=440289&r2=440290
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/build.xml Tue Sep  5 01:03:57
2006
@@ -146,7 +146,6 @@
                 <fileset dir="${hy.nio_char.src.test.java}">
                     <include name="**/*Test.java"/>
                     <exclude name="tests/api/java/nio/charset/ASCCharsetEncoderTest.java"/>
-                    <exclude name="tests/api/java/nio/charset/CharsetEncoderTest.java"/>
                     <exclude name="tests/api/java/nio/charset/CharsetProviderTest.java"/>
                     <exclude name="tests/api/java/nio/charset/CharsetTest.java"/>
                     <!-- No public constructor? -->

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java?view=diff&rev=440290&r1=440289&r2=440290
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
Tue Sep  5 01:03:57 2006
@@ -345,6 +345,7 @@
 		CoderResult result = null;
 		while (true) {
 			result = encode(in, output, false);
+            checkCoderResult(result);
 			if (result.isUnderflow()) {
 				break;
 			} else if (result.isOverflow()) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java?view=diff&rev=440290&r1=440289&r2=440290
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
Tue Sep  5 01:03:57 2006
@@ -596,6 +596,7 @@
 		encoder.onUnmappableCharacter(CodingErrorAction.REPORT);
 		if (in != null) {
 			try {
+                // regression test for Harmony-1379
 				encoder.encode(in);
 				fail("should throw MalformedInputException");
 			} catch (MalformedInputException e) {



Mime
View raw message