Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5200

[ibm vme] final fields cannot be set accessible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • VM
    • None

    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); }

      }

      Output on RI:

      3

      Output on Harmony/IBM VME:

      Exception in thread "main" java.lang.IllegalAccessException
      at java.lang.reflect.Field.setImpl(Native Method)
      at java.lang.reflect.Field.set(Field.java:430)
      at Test.main(Test.java:8)

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

      The similar issue exists for DRLVM: HARMONY-5199

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vmz Vasily Zakharov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: