Issue Details (XML | Word | Printable)

Key: HARMONY-5199
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Alexey Varlamov
Reporter: Alexei Fedotov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Harmony

[drlvm][kernel] final fields cannot be set accessible

Created: 26/Nov/07 08:53 PM   Updated: 27/Nov/07 10:30 AM
Return to search
Component/s: DRLVM
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works fix_if.patch 2007-11-26 09:31 PM Alexei Fedotov 1 kB
Text File Licensed for inclusion in ASF works test_fix_if.patch 2007-11-26 09:31 PM Alexei Fedotov 2 kB
Issue Links:
Duplicate
 
Reference
 

Patch Info: Patch Available
Resolution Date: 27/Nov/07 06:14 AM


 Description  « Hide
The following simple test fails:
import java.lang.reflect.*;
public class TestField {
    final public int g = 3;
    public static void main(String[] args) throws Exception {
        TestField t = new TestField();
        Field f = t.getClass().getField("g");
        f.setAccessible(true);
        f.setInt(t, 4);
        System.out.println(t.g);
    }
}

See the last comment at http://jira.codehaus.org/browse/XSTR-379




 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.