harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-4927) [drlvm][kernel] cannot modify final instance fields via reflection
Date Tue, 27 Nov 2007 07:09:43 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Alexey Varlamov closed HARMONY-4927.

    Resolution: Fixed
      Assignee: Alexey Varlamov

Fixed at revision: 598534.

> [drlvm][kernel] cannot modify final instance fields via reflection
> ------------------------------------------------------------------
>                 Key: HARMONY-4927
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4927
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Alexey Varlamov
>            Assignee: Alexey Varlamov
>            Priority: Minor
> Accidentally I spotted the following minor misbehavior of reflection in DRLVM, it does
not allow to modify final instance fields. The 1.5 spec of j.l.reflect.Field.set() reads:
> "If the underlying field is final, the method throws an IllegalAccessException unless
setAccessible(true) has succeeded for this field and this field is non-static. Setting a final
field in this way is meaningful only during deserialization or reconstruction of instances
of classes with blank final fields, before they are made available for access by other parts
of a program. Use in any other context may have unpredictable effects, including cases in
which other parts of a program continue to use the original value of this field."
> BTW, I'd suggest to add a testcase for this to kernel tests rather than to regression

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message