java.lang.String.interned

Date view Thread view Subject view Author view

From: Archie Cobbs (archie@whistle.com)
Date: Sat Dec 19 1998 - 18:13:57 EST


In String.java:

    final public class String implements Serializable
    {
        char[] value;
        int offset;
        int count;
        int hash;
        boolean interned;

        ...

I don't see "interned" ever being set anywhere... ie, this is a
bug. It looks like the fix is to add "interned" to java_lang_String.h
and set it to true in internJavaString().

Also, why does java_lang_String.h have this structure "data"?
Why can't java_lang_String.h just be equal to the output of kaffeh?
Is this some kind of holdover from long ago?

  typedef struct Hjava_lang_String {
        Hjava_lang_Object base;
        struct {
                HArrayOfChar* value;
                jint offset;
                jint count;
        } data[1];
  } Hjava_lang_String;

Thanks,
-Archie

___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:24 EDT