[patch] Java definite assignment

Fergus Henderson fjh@cs.mu.oz.au
Tue Feb 6 16:35:00 GMT 2001


On 06-Feb-2001, Alexandre Petit-Bianco <apbianco@cygnus.com> wrote:
>> Per Bothner writes:
>> > Without this patch gcj complains that
> > "Variable `xx' may not have been initialized":
>> Any ideas on how we could have
>> String x; try { x = new String (); } finally {} x.toString ();
>> not to report a similar error message?

Surely it *should* issue an error message in that case.
If `new String ()' throws an exception (e.g. because we're
out of memory), then `x' will never get explicitly initialized.
(Is there something I'm missing here?)
-- 
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
 | of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh > | -- the last words of T. S. Garp.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /