harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Salikh Zakirov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-721) kernel class VM lacks intern() method
Date Fri, 30 Jun 2006 14:45:30 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-721?page=all ]

Salikh Zakirov updated HARMONY-721:
-----------------------------------

    Attachment: 0001-Moved-intern-native-implementation-from-String-to-VM.txt

The attached patch fixes the problem trivially by moving the JNI native method
implementation to Java_org_apache_harmony_kernel_vm_VM.cpp with appropriate
function rename.

The output on Linux/ia32 after the bug fix:

$ ./lnx_ia32_gcc_debug/deploy/jre/bin/ij -cp ./lnx_ia32_gcc_release/semis/vm/_smoke.tests/classes
 util.StringIntern
PASS


> kernel class VM lacks intern() method
> -------------------------------------
>
>          Key: HARMONY-721
>          URL: http://issues.apache.org/jira/browse/HARMONY-721
>      Project: Harmony
>         Type: Bug

>   Components: VM
>  Environment: Linux/ia32
>     Reporter: Salikh Zakirov
>  Attachments: 0001-Moved-intern-native-implementation-from-String-to-VM.txt
>
> The removal of String and StringBuffer classes (HARMONY-666) from DRLVM has missed the
necessary update
> to org.apache.harmony.kernel.vm.VM.
> The following test reproduces the problem:
> ---8<---
> public class StringIntern {
>     public static void main(String[] args) {
>         String s = "abcde";
>         String s0 = "abcde".intern();
>         String s1 = ("abc" + "de").intern();
>         String s2 = ("ab" + "cde").intern();
>         if (s0 != s1 || s1 != s2) {
>             System.out.println("FAIL: incorrect interning");
>         } else if (s != s0) {
>             System.out.println("FAIL: literal is not interned");
>         } else {
>             System.out.println("PASS");
>         } 
>     }    
> }         
> ---------
> Current output on Linux/ia32 is
> $ ./lnx_ia32_gcc_debug/deploy/jre/bin/ij -cp ./lnx_ia32_gcc_release/semis/vm/_smoke.tests/classes
 util.StringIntern
> java.lang.NoSuchMethodError: Can't find method org/apache/harmony/kernel/vm/VM.intern(Ljava/lang/String;)Ljava/lang/String;
while resolving constant pool entry at index 59 in class java/lang/String
>         at util.StringIntern.main()

-- 
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