Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1901

Plastic creates field access methods for some injected fields unnecessarily

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.3.3, 5.4
    • None
    • plastic
    • None

    Description

      While looking into another problem, noticed the following:

      final reject_field_change_internalComponentResources(Lorg/apache/tapestry5/internal/InternalComponentResources;)V
      NEW java/lang/IllegalStateException
      DUP
      LDC "Field internalComponentResources of class test.base.pages.Grandparent is read-only."
      INVOKESPECIAL java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      ATHROW
      MAXSTACK = 0
      MAXLOCALS = 0

      Plastic should not be creating such methods for injected fields; those fields are not visible to (untransformed) subclasses (they don't exist until after transformation). These kinds of methods exist for incorrect user code that (in untransformed classes) illegally assigns to a field that is read-only in the transformed class.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: