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
Vasily Zakharov made changes - 26/Nov/07 09:01 PM
Field Original Value New Value
Link This issue relates to HARMONY-5196 [ HARMONY-5196 ]
Vasily Zakharov made changes - 26/Nov/07 09:08 PM
Link This issue relates to HARMONY-5200 [ HARMONY-5200 ]
Alexei Fedotov made changes - 26/Nov/07 09:10 PM
Description 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.set(t, 4);
        System.out.println(t.g);
    }
}

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


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


Alexei Fedotov made changes - 26/Nov/07 09:31 PM
Attachment test_fix_if.patch [ 12370242 ]
Attachment fix_if.patch [ 12370241 ]
Alexey Varlamov made changes - 27/Nov/07 06:11 AM
Link This issue duplicates HARMONY-4927 [ HARMONY-4927 ]
Alexey Varlamov made changes - 27/Nov/07 06:14 AM
Assignee Alexey Varlamov [ varlax ]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Duplicate [ 3 ]
Alexei Fedotov made changes - 27/Nov/07 10:30 AM
Status Resolved [ 5 ] Closed [ 6 ]