How to overcome MissingResourceException (gnu.java.locale.Calendar)
João Garcia
jgarcia@uk2.net
Fri Jun 11 18:02:00 GMT 2004
Tom Tromey wrote:
>>>>>>"João" == João Garcia <jgarcia@uk2.net> writes:
>>>>>>>>>>>>>>João> It seems that we can replace the previous line simply by:
>João> private static Class _c = false ? gnu.java.locale.Calendar.class : null;
>João> And it will still do the trick for gcj. But I do not know if this one
>João> shall stand true for the upcoming versions of gcj...
>>Don't rely on this working. I'm a bit surprised it works now --
>I would expect the dead code to be eliminated. It may break if you
>compile with optimization.
>>>I did the test using gcj 3.3.3 without optimizations...
As you say, it fails with optimizations.
It was not a logical approach anyway... I was just surprised by the result.
I guess that the initial suggestion
(using System.getProperty("java.vendor","").equals("Free Software Foundation, Inc.")),
should be save to use, and should solve the original problem.
Joao
More information about the Java
mailing list