Problem with StringBuffer

Artur Biesiadowski abies at
Tue Apr 4 14:15:15 PDT 2000

Archie Cobbs wrote:

>         // Note: value, offset, and count are not private, because
>         // StringBuffer uses them for faster access
> -       char[] value;
> -       int offset;
> -       int count;
> +       char[] value;           // really "final"
> +       int offset;             // really "final"
> +       int count;              // really "final"

And why these fields are not in fact final ? They are assigned to only
in constructor so they could be safely marked as final. I don't suppose
it will make any difference in speed with current jit, but it would be
selfdocumenting code - plus possibility of catching some bug early
during String changes/optimalizations.


More information about the kaffe mailing list