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] Created: (HARMONY-4927) [drlvm][kernel classes] cannot modify final instance fields via reflection
Date Thu, 11 Oct 2007 06:30:51 GMT
[drlvm][kernel classes] 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
            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 suite.

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

View raw message