Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8280798

com.sun.jdi.ObjectReference::setValue spec should prohibit any final field modification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • None
    • core-svc
    • b27
    • generic
    • generic

      com.sun.jdi.ObjectReference::setValue spec says:
      --------
      Sets the value of a given instance or static field in this object. The Field must be valid for this ObjectReference; that is, it must be from the mirrored object's class or a superclass of that class. If static, the field must not be final.
      -------
      "If static" is confusing here.
      The method throws IllegalArgumentException ("Cannot set value of final field") for both static and instance final fields.

            amenkov Alex Menkov
            amenkov Alex Menkov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: