This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to overcome MissingResourceException (gnu.java.locale.Calendar)


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]