harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4927) [drlvm][kernel] cannot modify final instance fields via reflection
Date Mon, 15 Oct 2007 12:29:51 GMT

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

Gregory Shimansky updated HARMONY-4927:
---------------------------------------

    Summary: [drlvm][kernel] cannot modify final instance fields via reflection  (was: [drlvm][kernel
classes] cannot modify final instance fields via reflection)

> [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
>            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.


Mime
View raw message