On 04/25/2012 02:07 AM, Andrew Hughes wrote:
> ----- Original Message -----
>> Attached is a patch that enables GNU Classpath to distinguish between
>> normal assertions and assertions for system classes (i.e. null
>> classloader) as discussed on the Classpath mailing list .
>> Note that the new method
>> 'java/lang/VMClassLoader.getSystemAssertionStatus()' must be
>> otherwise an exception will occur.
> I'm confused about something in this patch which perhaps you can explain.
> I was under the impression that all system classes had assertions enabled
> and disabled as 'system assertions' (-esa/-dsa). So I was expecting
> the patch to just return this value if the classloader was null. Why does
> it instead retrieve a system classloader and probe that on a per-package/class
> basis? How would these values be set?
> As quoted before, the Oracle documentation explicitly states that -ea does
> not turn on system assertions. This patch would imply that e.g. assertions
> for java.lang could be turned on by -ea:java.lang. Is this intentional?
"The above switches apply to all class loaders. With one exception, they
also apply to system classes (which do not have an explicit class
loader). The exception concerns the switches with no arguments, which
(as indicated above) do not apply to system classes."