[jira] Created: (HARMONY-179) [classlib][luni] Java 5 enhancements for java.lang.Boolean
[classlib][luni] Java 5 enhancements for java.lang.Boolean -- Key: HARMONY-179 URL: http://issues.apache.org/jira/browse/HARMONY-179 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Enhancements for java.lang.Boolean, test cases, javadoc and a little cleanup. -- 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
[jira] Updated: (HARMONY-179) [classlib][luni] Java 5 enhancements for java.lang.Boolean
[ http://issues.apache.org/jira/browse/HARMONY-179?page=all ] Nathan Beyer updated HARMONY-179: - Attachment: Boolean_java_5_patch.txt BooleanTest.java .txt file is a patch for java.lang.Boolean and the .java file is the new test case. [classlib][luni] Java 5 enhancements for java.lang.Boolean -- Key: HARMONY-179 URL: http://issues.apache.org/jira/browse/HARMONY-179 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Attachments: BooleanTest.java, Boolean_java_5_patch.txt Enhancements for java.lang.Boolean, test cases, javadoc and a little cleanup. -- 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
[jira] Created: (HARMONY-180) [classlib][luni] Java 5 enhancements for java.lang.Byte
[classlib][luni] Java 5 enhancements for java.lang.Byte --- Key: HARMONY-180 URL: http://issues.apache.org/jira/browse/HARMONY-180 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Enhancements for java.lang.Byte, test cases, javadoc and a little cleanup. -- 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
[jira] Updated: (HARMONY-180) [classlib][luni] Java 5 enhancements for java.lang.Byte
[ http://issues.apache.org/jira/browse/HARMONY-180?page=all ] Nathan Beyer updated HARMONY-180: - Attachment: ByteTest.java Byte_java_5_patch.txt 'Byte_java_5_patch.txt' is a patch for java.lang.Byte to implement Java 5 enhancements. The most notable is the 'valueOf(byte)', which I've implemented with a simple array-based cache. I've also updated the other methods that used the 'Byte(byte)' constructor to use this method instead. I believe these new 'valueOf' methods in the primitive wrappers are intended to be utilized by the VM (compiler?) for auto-boxing, hence the caching to help resource consumption. The 'BytesTest.java' is an initial swipe at the test case. Currently it only tests the new method. I'll try to flush it out more completely later. [classlib][luni] Java 5 enhancements for java.lang.Byte --- Key: HARMONY-180 URL: http://issues.apache.org/jira/browse/HARMONY-180 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Attachments: ByteTest.java, Byte_java_5_patch.txt Enhancements for java.lang.Byte, test cases, javadoc and a little cleanup. -- 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
[jira] Updated: (HARMONY-168) Java 5.0 methods missing in java.lang.StringBuffer class
[ http://issues.apache.org/jira/browse/HARMONY-168?page=all ] Nathan Beyer updated HARMONY-168: - Attachment: StringBuffer_missing_methods.txt StringBuffer_missing_methods.txt is a patch for these missing methods and test methods for the respective test case class. Those methods that deal with Java 5/Unicode code points are implemented/not-implemented to be consistent with what's currently in StringBuilder and awaiting Java 5 code point support. Additionally, the Appendable interface isn't implemented yet, so I added a TODO for adding it once JLS3 bytecode support is enabled; in particular, support for covariant return types. Java 5.0 methods missing in java.lang.StringBuffer class Key: HARMONY-168 URL: http://issues.apache.org/jira/browse/HARMONY-168 Project: Harmony Type: Bug Components: Classlib Reporter: Vasily Zakharov Priority: Minor Attachments: StringBuffer_missing_methods.txt The following Java 5.0 methods are missing in java.lang.StringBuffer class: StringBuffer(CharSequence) append(CharSequence) append(CharSequence, int, int) insert(int, CharSequence) insert(int, CharSequence, int, int) trimToSize() appendCodePoint(int) codePointAt(int) codePointBefore(int) codePointCount(int, int) offsetByCodePoints(int, int) -- 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
[jira] Commented: (HARMONY-169) System.getenv(String) throws Error
[ http://issues.apache.org/jira/browse/HARMONY-169?page=comments#action_12368914 ] Nathan Beyer commented on HARMONY-169: -- This is a duplicate of this issue: http://issues.apache.org/jira/browse/HARMONY-104. System.getenv(String) throws Error -- Key: HARMONY-169 URL: http://issues.apache.org/jira/browse/HARMONY-169 Project: Harmony Type: Bug Components: VM Reporter: Vasily Zakharov System.getenv(String) method throws Error on call. This is a valid behaviour (the same as of RI) for Java 1.4, as the method is deprecated, but this is not valid for Java 5.0, where this method is not deprecated again and must be implemented and work normally. Also System.getenv() method (Java 5.0) is not implemented at all. -- 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
[jira] Commented: (HARMONY-143) [classlib][luni] Additional Java 5 interfaces for LUNI: Iterable and Flushable.
[ http://issues.apache.org/jira/browse/HARMONY-143?page=comments#action_12368296 ] Nathan Beyer commented on HARMONY-143: -- Looks good. [classlib][luni] Additional Java 5 interfaces for LUNI: Iterable and Flushable. --- Key: HARMONY-143 URL: http://issues.apache.org/jira/browse/HARMONY-143 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Assignee: Tim Ellison Priority: Minor Attachments: Flushable.java, Iterable.java Additional Java 5 interfaces for LUNI: Iterable and Flushable. -- 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
[jira] Commented: (HARMONY-140) [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation
[ http://issues.apache.org/jira/browse/HARMONY-140?page=comments#action_12368297 ] Nathan Beyer commented on HARMONY-140: -- Looks good. Thanks. [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation -- Key: HARMONY-140 URL: http://issues.apache.org/jira/browse/HARMONY-140 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Assignee: Tim Ellison Priority: Minor Attachments: Collections_frequency_patch.txt, Collections_new_methods_patch.txt A patch for the java.util.Collection.frequency(Collection,Object) method. This patch also includes test case updates. http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#frequency(java.util.Collection,%20java.lang.Object) -- 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
[jira] Created: (HARMONY-143) [classlib][luni]
[classlib][luni] Key: HARMONY-143 URL: http://issues.apache.org/jira/browse/HARMONY-143 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Additional Java 5 interfaces for LUNI: Iterable and Flushable. -- 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
[jira] Updated: (HARMONY-143) [classlib][luni]
[ http://issues.apache.org/jira/browse/HARMONY-143?page=all ] Nathan Beyer updated HARMONY-143: - Attachment: Flushable.java Iterable.java [classlib][luni] Key: HARMONY-143 URL: http://issues.apache.org/jira/browse/HARMONY-143 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Attachments: Flushable.java, Iterable.java Additional Java 5 interfaces for LUNI: Iterable and Flushable. -- 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
[jira] Created: (HARMONY-140) [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation
[classlib][luni] java.util.Collections.frequency(Collection,Object) implementation -- Key: HARMONY-140 URL: http://issues.apache.org/jira/browse/HARMONY-140 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Attachments: Collections_frequency_patch.txt A patch for the java.util.Collection.frequency(Collection,Object) method. This patch also includes test case updates. http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#frequency(java.util.Collection,%20java.lang.Object) -- 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
[jira] Updated: (HARMONY-140) [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation
[ http://issues.apache.org/jira/browse/HARMONY-140?page=all ] Nathan Beyer updated HARMONY-140: - Attachment: Collections_frequency_patch.txt [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation -- Key: HARMONY-140 URL: http://issues.apache.org/jira/browse/HARMONY-140 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Attachments: Collections_frequency_patch.txt A patch for the java.util.Collection.frequency(Collection,Object) method. This patch also includes test case updates. http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#frequency(java.util.Collection,%20java.lang.Object) -- 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
[jira] Updated: (HARMONY-140) [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation
[ http://issues.apache.org/jira/browse/HARMONY-140?page=all ] Nathan Beyer updated HARMONY-140: - Attachment: Collections_new_methods_patch.txt [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation -- Key: HARMONY-140 URL: http://issues.apache.org/jira/browse/HARMONY-140 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Attachments: Collections_frequency_patch.txt, Collections_new_methods_patch.txt A patch for the java.util.Collection.frequency(Collection,Object) method. This patch also includes test case updates. http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#frequency(java.util.Collection,%20java.lang.Object) -- 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
[jira] Commented: (HARMONY-140) [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation
[ http://issues.apache.org/jira/browse/HARMONY-140?page=comments#action_12368071 ] Nathan Beyer commented on HARMONY-140: -- Ignore the Collection_frequency_patch.txt. Collections_new_methods_patch.txt contains the 'frequency' method as well as the 'reverseOrder(Comparator)' method and the matching test cases. I'd change the issue title, but I don't know how or don't have access to do that. Spec references: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#frequency(java.util.Collection,%20java.lang.Object) http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#reverseOrder(java.util.Comparator) [classlib][luni] java.util.Collections.frequency(Collection,Object) implementation -- Key: HARMONY-140 URL: http://issues.apache.org/jira/browse/HARMONY-140 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Attachments: Collections_frequency_patch.txt, Collections_new_methods_patch.txt A patch for the java.util.Collection.frequency(Collection,Object) method. This patch also includes test case updates. http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#frequency(java.util.Collection,%20java.lang.Object) -- 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
[jira] Updated: (HARMONY-103) java.lang.StringBuilder Implementation for LUNI
[ http://issues.apache.org/jira/browse/HARMONY-103?page=all ] Nathan Beyer updated HARMONY-103: - Attachment: StringBuilder_javadoc_patch.txt Here's a patch for the Javadoc to StringBuilder. This time it's 100% of my own creation. java.lang.StringBuilder Implementation for LUNI --- Key: HARMONY-103 URL: http://issues.apache.org/jira/browse/HARMONY-103 Project: Harmony Type: New Feature Components: Classlib Reporter: Nathan Beyer Assignee: Tim Ellison Attachments: StringBuilder.java, StringBuilderTest.java, StringBuilder_javadoc_patch.txt This bug is for submitting an implementation of the java.lang.StringBuilder to the LUNI module of classlib. The implementation and class definition is based on the specification at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html. The implementation is not complete, there are a few method that are either incomplete or not implemented. All of these are related to the Unicode Code Point support, as defined by Java 5. As for the rest of the implementation, there are probably a number of optimization points, but the focus was to complete the functionality and make it compatible with various Java 5 runtimes. Additionally, I had a problem with compiling this class in Eclipse 3.1.2. When I set the compiler to Java 1.4 compliance level, the methods which implement the Appendable interface cause compilation errors. When I set the compiler to Java 5.0 compliance with Java 1.4 .class file compatability and Java 1.4 source compatibility, the class compiled fine. I'm not sure if this is quirk of the JDT compiler or what, but I'm going to do some investigation and testing to see if I can isolate it. -- 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
[jira] Created: (HARMONY-103) java.lang.StringBuilder Implementation for LUNI
java.lang.StringBuilder Implementation for LUNI --- Key: HARMONY-103 URL: http://issues.apache.org/jira/browse/HARMONY-103 Project: Harmony Type: New Feature Components: Classlib Reporter: Nathan Beyer This bug is for submitting an implementation of the java.lang.StringBuilder to the LUNI module of classlib. The implementation and class definition is based on the specification at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html. The implementation is not complete, there are a few method that are either incomplete or not implemented. All of these are related to the Unicode Code Point support, as defined by Java 5. As for the rest of the implementation, there are probably a number of optimization points, but the focus was to complete the functionality and make it compatible with various Java 5 runtimes. Additionally, I had a problem with compiling this class in Eclipse 3.1.2. When I set the compiler to Java 1.4 compliance level, the methods which implement the Appendable interface cause compilation errors. When I set the compiler to Java 5.0 compliance with Java 1.4 .class file compatability and Java 1.4 source compatibility, the class compiled fine. I'm not sure if this is quirk of the JDT compiler or what, but I'm going to do some investigation and testing to see if I can isolate it. -- 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
[jira] Updated: (HARMONY-103) java.lang.StringBuilder Implementation for LUNI
[ http://issues.apache.org/jira/browse/HARMONY-103?page=all ] Nathan Beyer updated HARMONY-103: - Attachment: StringBuilder.java The actual java.lang.StringBuilder class. java.lang.StringBuilder Implementation for LUNI --- Key: HARMONY-103 URL: http://issues.apache.org/jira/browse/HARMONY-103 Project: Harmony Type: New Feature Components: Classlib Reporter: Nathan Beyer Attachments: StringBuilder.java This bug is for submitting an implementation of the java.lang.StringBuilder to the LUNI module of classlib. The implementation and class definition is based on the specification at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html. The implementation is not complete, there are a few method that are either incomplete or not implemented. All of these are related to the Unicode Code Point support, as defined by Java 5. As for the rest of the implementation, there are probably a number of optimization points, but the focus was to complete the functionality and make it compatible with various Java 5 runtimes. Additionally, I had a problem with compiling this class in Eclipse 3.1.2. When I set the compiler to Java 1.4 compliance level, the methods which implement the Appendable interface cause compilation errors. When I set the compiler to Java 5.0 compliance with Java 1.4 .class file compatability and Java 1.4 source compatibility, the class compiled fine. I'm not sure if this is quirk of the JDT compiler or what, but I'm going to do some investigation and testing to see if I can isolate it. -- 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
[jira] Updated: (HARMONY-103) java.lang.StringBuilder Implementation for LUNI
[ http://issues.apache.org/jira/browse/HARMONY-103?page=all ] Nathan Beyer updated HARMONY-103: - Attachment: StringBuilderTest.java JUnit test case for StringBuilder. I've run this test against Sun's JRE 5.0_5 and BEA's JRE 5.0_4_R26.0 and this test passes with one exception with the insert(int, char) method, which based on the API specification I would consider a bug, but how this is handled in Harmony is up for debate. Note: I was unable to test the serialization, as from what I can tell the current Harmony snapshots don't support it. I was getting a NoSuchAlgorithm for the MesageDigest SHA. However, I do believe the the serialization is implemented correctly, at least according to the specification. java.lang.StringBuilder Implementation for LUNI --- Key: HARMONY-103 URL: http://issues.apache.org/jira/browse/HARMONY-103 Project: Harmony Type: New Feature Components: Classlib Reporter: Nathan Beyer Attachments: StringBuilder.java, StringBuilderTest.java This bug is for submitting an implementation of the java.lang.StringBuilder to the LUNI module of classlib. The implementation and class definition is based on the specification at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html. The implementation is not complete, there are a few method that are either incomplete or not implemented. All of these are related to the Unicode Code Point support, as defined by Java 5. As for the rest of the implementation, there are probably a number of optimization points, but the focus was to complete the functionality and make it compatible with various Java 5 runtimes. Additionally, I had a problem with compiling this class in Eclipse 3.1.2. When I set the compiler to Java 1.4 compliance level, the methods which implement the Appendable interface cause compilation errors. When I set the compiler to Java 5.0 compliance with Java 1.4 .class file compatability and Java 1.4 source compatibility, the class compiled fine. I'm not sure if this is quirk of the JDT compiler or what, but I'm going to do some investigation and testing to see if I can isolate it. -- 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
[jira] Created: (HARMONY-104) System.getenv() throws Error
System.getenv() throws Error Key: HARMONY-104 URL: http://issues.apache.org/jira/browse/HARMONY-104 Project: Harmony Type: Bug Reporter: Nathan Beyer Priority: Minor According to the Java 5 specification, the 'System.getenv(String)' method is no longer deprecated [1]. The currently implementation of this method in Harmony always throws an Error. This isn't a major priority, but it seemed like something to point out. Along with this method, there's an additional method for getting a Map of all environment variables [2]. [1] http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getenv(java.lang.String) [2] http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getenv() -- 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
[jira] Updated: (HARMONY-105) System.clearProperty(String) Implementation Patch
[ http://issues.apache.org/jira/browse/HARMONY-105?page=all ] Nathan Beyer updated HARMONY-105: - Attachment: System_clearProperty_patch.txt Patch for System.java in the kernel module of classlib. System.clearProperty(String) Implementation Patch - Key: HARMONY-105 URL: http://issues.apache.org/jira/browse/HARMONY-105 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Attachments: System_clearProperty_patch.txt The method System.clearProperty(String) has been add to Java 5. This bug contains a patch that adds this method to the 'kernel' module of the 'classlib'. -- 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
[jira] Created: (HARMONY-105) System.clearProperty(String) Implementation Patch
System.clearProperty(String) Implementation Patch - Key: HARMONY-105 URL: http://issues.apache.org/jira/browse/HARMONY-105 Project: Harmony Type: Improvement Components: Classlib Reporter: Nathan Beyer Priority: Minor Attachments: System_clearProperty_patch.txt The method System.clearProperty(String) has been add to Java 5. This bug contains a patch that adds this method to the 'kernel' module of the 'classlib'. -- 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
[jira] Created: (HARMONY-87) Test cases for 'text' Classlib module
Test cases for 'text' Classlib module - Key: HARMONY-87 URL: http://issues.apache.org/jira/browse/HARMONY-87 Project: Harmony Type: Test Components: Classlib Reporter: Nathan Beyer Attachments: AnnotationTest.java, StringCharacterIteratorTest.java I'm attaching some test cases for some of the classes in the 'text' module. I've run these tests against Sun's JRE 1.4.2_10 as well as the current code in SVN. -- 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
[jira] Updated: (HARMONY-87) Test cases for 'text' Classlib module
[ http://issues.apache.org/jira/browse/HARMONY-87?page=all ] Nathan Beyer updated HARMONY-87: Attachment: AnnotationTest.java StringCharacterIteratorTest.java Tests for java.text.Annotation and java.text.StringCharacterIterator. Test cases for 'text' Classlib module - Key: HARMONY-87 URL: http://issues.apache.org/jira/browse/HARMONY-87 Project: Harmony Type: Test Components: Classlib Reporter: Nathan Beyer Attachments: AnnotationTest.java, StringCharacterIteratorTest.java I'm attaching some test cases for some of the classes in the 'text' module. I've run these tests against Sun's JRE 1.4.2_10 as well as the current code in SVN. -- 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
[jira] Updated: (HARMONY-63) java.text.MessageFormat.parse(String): incorrect size of Object array parsed from the string
[ http://issues.apache.org/jira/browse/HARMONY-63?page=all ] Nathan Beyer updated HARMONY-63: Attachment: MessageFormat_patch.txt Try this patch out. It should resolve the issue and update the test case with a regression test, as proposed by the reporter. It seems like the MessageFormat and other related format classes need some serious testing done, so we may need to just write a full test case to make sure this little fix and others aren't introducing new issues. java.text.MessageFormat.parse(String): incorrect size of Object array parsed from the string Key: HARMONY-63 URL: http://issues.apache.org/jira/browse/HARMONY-63 Project: Harmony Type: Bug Components: Classlib Reporter: tatyana doubtsova Attachments: MessageFormat_patch.txt Problem details: Method java.text.MessageFormat.parse(String) returns the array of 10 elements when parsing string 1,00,00' using pattern {0,number,#,}. It should return array of 1 element. Code for reproducing Test.java: import java.text.MessageFormat; import java.util.Locale; public class Test { public static void main(String[] args) { try { MessageFormat mf = new MessageFormat({0,number,#,}, Locale.US); Object[] res = mf.parse(1,00,00); System.out.println(result's length: + res.length); for (int i = 0; i res.length; i++) { System.out.println(result is: + res[0]); } } catch (Exception e) { e.printStackTrace(); } } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile Test.java using BEA 1.4 javac javac -d . Test.java 3. Run java using compatible VM (J9) java -showversion Test Output: java version 1.4.2 (subset) (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. result's length: 10 result is: 1 result is: 1 result is: 1 result is: 1 result is: 1 result is: 1 result is: 1 result is: 1 result is: 1 result is: 1 Output on BEA 1.4.2 to compare with: result's length: 1 result is: 1 Suggested junit test case: package org.apache.harmony.tests.java.text; import java.text.MessageFormat; import java.util.Locale; import junit.framework.TestCase; public class MessageFormatTest extends TestCase { public static void main(String[] args) { junit.textui.TestRunner.run(MessageFormatTest.class); } public void test_parse() { try { MessageFormat mf = new MessageFormat({0,number,#,}, Locale.US); Object[] res = mf.parse(1,00,00); assertEquals(Assert 0: incorrect size of parsed data , 1, res.length); } catch (Exception e) { fail(Assert 0: Unexpected exception + e); } } } -- 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
[jira] Updated: (HARMONY-59) java.text.MessageFormat.toPattern() causes IndexOutOfBoundsException in StringBuffer.setLength method
[ http://issues.apache.org/jira/browse/HARMONY-59?page=all ] Nathan Beyer updated HARMONY-59: Attachment: ChoiceFormat_patches.txt ChoiceFormatTest.java The issue is in how the ChoiceFormat.toPattern() was implemented. The method would loop through all formats and append a '|' character at the end of very loop, then it would decrement the length of the StringBuffer by one, so as to eliminate the extra OR symbol. This works fine if there's a format, but in the test case, there wasn't one, the MessageFormat class would pass an empty string to the ChoiceFormat constructor. To fix this, I've just move the OR symbol appending to the beginning of the loop and append it when it's not the first loop and remove the length adjustment. This should resolve the issue. Addittionally, I've attached a TestCase for ChoiceFormat to verify this functionality and a bit more. java.text.MessageFormat.toPattern() causes IndexOutOfBoundsException in StringBuffer.setLength method -- Key: HARMONY-59 URL: http://issues.apache.org/jira/browse/HARMONY-59 Project: Harmony Type: Bug Components: Classlib Reporter: tatyana doubtsova Attachments: ChoiceFormatTest.java, ChoiceFormat_patches.txt Problem details: According to j2se 1.4.2, method toPattern() should return a pattern representing the current state of the message format. However, Harmony throws IndexOutOfBoundsException for CHOICE {1,choice} message format. Code for reproducing Test.java: import java.text.*; public class Test { public static void main(String[] args) { MessageFormat mf = new MessageFormat(CHOICE {1,choice}); String ptrn = mf.toPattern(); System.out.println(ptrn = + ptrn); } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile Test.java using BEA 1.4 javac javac -d . Test.java 3. Run java using compatible VM (J9) java -showversion Test Output: java version 1.4.2 (subset) (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. Exception in thread main java.lang.IndexOutOfBoundsException at java.lang.StringBuffer.setLength(StringBuffer.java:810) at java.text.ChoiceFormat.toPattern(ChoiceFormat.java:386) at java.text.MessageFormat.toPattern(MessageFormat.java:802) at Test.main(Test.java:5) Output on BEA 1.4.2 to compare with: ptrn = CHOICE {1,choice,} Suggested junit test case: package org.apache.harmony.tests.java.text; import java.text.MessageFormat; import java.util.Locale; import junit.framework.TestCase; public class MessageFormatTest extends TestCase { public static void main(String[] args) { junit.textui.TestRunner.run(MessageFormatTest.class); } public void test_toPattern() { try { MessageFormat mf = new MessageFormat(CHOICE {1,choice}); String ptrn = mf.toPattern(); } catch (Exception e) { fail(Assert 0: Unexpected exception + e); } } } -- 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
[jira] Created: (HARMONY-74) kernel files do not fully comply with serialVersionUID spec
kernel files do not fully comply with serialVersionUID spec --- Key: HARMONY-74 URL: http://issues.apache.org/jira/browse/HARMONY-74 Project: Harmony Type: Bug Components: Classlib Reporter: Nathan Beyer Priority: Minor Patch to modify scope of serialVersionUID fields. -- 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