Note on BC and type assertions
Andrew Haley
aph@redhat.com
Fri Oct 15 19:00:00 GMT 2004
Tom Tromey writes:
> Andrew> That's why I wanted to generate code for the assertions. Then
> Andrew> you can assert anything you want.
>
> There is a hidden issue, which is what this code looks like. E.g., if
> it includes a call to Class.getModifiers (to check non-abstractness),
> then it needs to go via the [ao]table.
I don't think that's possible: the assertions are checked very early.
> If it is a new _Jv_ function, then that is another fixed part of
> the API. This isn't a major thing, of course, but I wanted to make
> sure it is explicit.
That's true, indeed: we might have to use class.forName() for
backwards compatiblity.
We don't necessarily know what we might need to assert in the future
if, for example, we find some unexpected security hole.
Andrew.
More information about the Java
mailing list