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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • DRLVM
    • None
    • Patch Available

    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.setInt(t, 4); System.out.println(t.g); }

      }

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

      Attachments

        1. fix_if.patch
          1 kB
          Alexei Fedotov
        2. test_fix_if.patch
          2 kB
          Alexei Fedotov

        Issue Links

          Activity

            People

              varlax Alexey Varlamov
              leshik Alexei Fedotov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: