Joseph Kesselman/Watson/IBM wrote:
>>>See the problem?
>>Not really.
> [...]
> Run application against the wrong xerces.jar. Since the value is now part
> of the application, the attempt to check the parser's version fails; it
> reports the version as seen at compile time.

Precisely.

> One can certainly argue that the failure here was that the compiler made an
> unjustified assumption, and that this is a compiler bug. But if this is
> happening in real-world JVMs, we should certainly consider trying to avoid
> provoking that bug.

I don't think this is a compiler bug. And if I weren't
already tired, I'd actually wade into the language/JVM
spec to find the reference. I think that the language
is defined such that a compiler MUST fold the constant
into the compiled class. But someone who's more awake
at the moment can look that up to be sure.

-- 
Andy Clark * [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to