You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/05/23 11:05:30 UTC

[jira] Assigned: (HARMONY-491) [classlib] Constructors of java.nio.charset.CharsetEncoder should not throw NPE if charset==null

     [ http://issues.apache.org/jira/browse/HARMONY-491?page=all ]

Mikhail Loenko reassigned HARMONY-491:
--------------------------------------

    Assign To: Mikhail Loenko

> [classlib] Constructors of java.nio.charset.CharsetEncoder should not throw NPE if charset==null
> ------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-491
>          URL: http://issues.apache.org/jira/browse/HARMONY-491
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: CharsetEncoder.txt
>
> The test listed below will pass on RI but fail on Harmony.
> import java.nio.*;
> import java.nio.charset.*;
> public class test { 
>     public static void main(String [] args) { 
>         CharsetEncoder cen=new CharsetEncoderImpl(null, 1, 1);
>         if (cen.charset() == null) {
>             System.out.println("PASSED");
>         } else 
>             System.out.println("FAILED");
>     }
> }
> class CharsetEncoderImpl extends CharsetEncoder {
>     public CharsetEncoderImpl(Charset arg0, float arg1, float arg2, byte[] arg3) {
>         super(arg0, arg1, arg2, arg3);
>     }
>     public boolean isLegalReplacement(byte[] arg0) {
>         return true;
>     }
>     public CharsetEncoderImpl(Charset arg0, float arg1, float arg2) {
>         super(arg0, arg1, arg2);
>     }
>     protected CoderResult encodeLoop(CharBuffer arg0, ByteBuffer arg1) {
>         return null;
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira