You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/07/11 13:02:07 UTC

[jira] Assigned: (HARMONY-4393) [classlib][nio charset] Charset KSC_5601 does not contains itself

     [ https://issues.apache.org/jira/browse/HARMONY-4393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reassigned HARMONY-4393:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][nio charset] Charset KSC_5601 does not contains itself 
> ------------------------------------------------------------------
>
>                 Key: HARMONY-4393
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4393
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows and Linux
>            Reporter: Vera Petrashkova
>            Assignee: Alexey Petrenko
>
> According to J2SE API specification 
>  of java.nio.Charset.contains(Charset) method 
>  It tells whether or not this charset contains the given charset and
>  that every charset contains itself.
> But KSC_5601 charset does not contain itself.
> To reproduce this issue run the following test:
> ------------test.java-------------
> import java.util.*;
> import java.nio.charset.*;
> public class test {
>     public static void main(String[] args) {
>         SortedMap allCharsets = Charset.availableCharsets();
>         Object[] names = allCharsets.keySet().toArray();
>         boolean failed = false;
>         for (int i = 0; i < names.length; i++){
>             Charset chset = (Charset) allCharsets.get(names[i]);
>             if (!chset.contains(chset)) {
>                 System.err.println("Charset(" + chset.name() + ").contains(Charset(" + chset.name() + ")) returns false ");
>                 failed = true;
>             }
>         }
>         System.err.println(!failed ? "Test passed" : "Test failed");
>     }
> }
> ---------------------------------
> Outout:
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r551077, (Jun 27 2007), Windows/ia32/msvc 1310, release build
> http://harmony.apache.org
> Charset(KSC_5601).contains(Charset(KSC_5601)) returns false
> Test failed
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r551077, (Jun 27 2007), Linux/ia32/gcc 3.3.3, release build
> http://harmony.apache.org
> Charset(KSC_5601).contains(Charset(KSC_5601)) returns false 
> Test failed
> It looks like regression because it is not reproducible on, for example, Harmony-r544496 or Harmony-r544707. See output:
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r544496, (Jun  5 2007), Windows/ia32/msvc 1310, debug build
> http://harmony.apache.org
> Test passed
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r544707, (Jun  6 2007), Linux/ia32/gcc 3.3.3, release build
> http://harmony.apache.org
> Test passed
> This issue causes the failure of the reliability test api/nio/charset/ContainsTest

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.