Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.9.3
-
Fix Version/s: 1000
-
Component/s: Runtime: Class Library: GNU Classpath
-
Labels:None
Description
RVM-314 added support for assertions from the command line to the RVM. This is done by support in our own java.lang.Class, VM_Class and VM_ClassLoader. There is some support for assertions in Classpath for assertions set using the java.lang.ClassLoader methods of setDefaultAssertionStatus, setPackageAssertionStatus and setClassAssertionStatus. The RVM java.lang.Class desiredAssertionStatus method doesn't integrate with these methods in ClassLoader, so enabling assertions via this API won't work.
In a situation like this we'd normally switch to using the Classpath implementation of Class desiredAssertionStatus however this doesn't seem a good idea here because, using a map to match package names doesn't seem likely to work to me, and the Class desiredAssertionStatus method doesn't just return a final field (which is typically accessed via a Class literal and can therefore be folded away) and as such looks deeply suboptimal.
Part of the problem here is that assertions have received a lack of TLC from Classpath, so in doing a proper implementation we'd need to rewrite a substantial part of Classpath.
Issue Links
- supercedes
-
RVM-314
Support for Java 1.4 assertions
-