[mkgmap-dev] Mapsource crashFrom Johann Gail johann.gail at gmx.de on Wed Jan 6 21:59:45 GMT 2010
> It's a great shame that we can't enable assertions by default.
>
>
>
Just looked at the java docs and found the following:
Programmers of certain critical systems might wish to ensure that
assertions are not disabled in the field. The following static
initialization idiom prevents a class from being initialized if its
assertions have been disabled:
static {
boolean assertsEnabled = false;
assert assertsEnabled = true; // *Intentional side effect!!!*
if (!assertsEnabled)
throw new RuntimeException("Asserts must be enabled!!!");
}
More information about the mkgmap-dev mailing list |