harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4393) [classlib][nio charset] Charset KSC_5601 does not contains itself
Date Mon, 09 Jul 2007 09:14:04 GMT
[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


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.


Mime
View raw message