harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetlana Samoilenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-491) [classlib] Constructors of java.nio.charset.CharsetEncoder should not throw NPE if charset==null
Date Tue, 23 May 2006 07:33:29 GMT
[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
    Priority: Minor


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


Mime
View raw message