From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Tromey To: java-gnats@sourceware.cygnus.com Subject: java/1259: string constants not handled properly Date: Wed, 20 Dec 2000 12:23:00 -0000 Message-id: <20000524002920.1408.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg01037.html List-Id: >Number: 1259 >Category: java >Synopsis: string constants not handled properly >Confidential: no >Severity: serious >Priority: medium >Responsible: apbianco >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Dec 20 12:18:23 PST 2000 >Closed-Date: >Last-Modified: >Originator: Tom Tromey >Release: unknown-1.0 >Organization: >Environment: >Description: According to section 12.4.1 of the JVM, a class or interface shouldn't be initialized if a field is passively referenced; this includes references to "static final" (or equiv.) fields whose value is a compile-time constant expression. The latter is defined (section 15.27) to include Strings. We don't seem to handle this at all. I checked in the "stringconst.java" test which demonstrates the bug. However, that is just one instance; I suspect there are others. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: Formerly PR gcj/241 >Unformatted: