Tapestry 5
  1. Tapestry 5
  2. TAP5-1801

Component fields should not need to be private, merely non-public

    Details

      Description

      Currently, Plastic assets, early, that all instance fields are private. Instead, it should check fields as transformations are applied to them, and ensure that they are merely non-public. Access to the fields from other classes (including inner classes) must be routed through access methods.

      Inner classes will now need a limited set of transformations, to handle the cases where a protected or package private field is directly accessed, in which case, the appropriate accessor method will be used instead.

      It seems possible that two transformed classes that each access the other's non-public fields might cause an endless loop; if so, this should be identified and reported.

        Activity

        Howard M. Lewis Ship created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.4 [ 12316401 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #648 (See https://builds.apache.org/job/tapestry-trunk-freestyle/648/)
        TAP5-1801: Allow non-public fields in instrumented classes

        Update some tests, due to non-private fields being allowed now
        TAP5-1801: Allow non-public fields in instrumented classes

        Support field instrumentation on accesses from inner classes
        TAP5-1801: Allow non-public fields in instrumented classes

        Add a test for cross-class field access
        TAP5-1801: Allow non-public fields in instrumented classes

        Refactor how file instrumentations are stored in the PlasticClass and in the PlasticClassPool
        TAP5-1801: Allow non-public fields in instrumented classes

        Added most of the logic for tracking instrument methods for fields of classes
        TAP5-1801: Allow non-public fields in instrumented classes

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222792
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/CoreBehaviorsTests.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Datum.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ProtectedFields.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222790
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassPool.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/plastic/ClassType.java
        • /tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldAccessTests.groovy
        • /tapestry/tapestry5/trunk/plastic/src/test/java/testinterfaces/ValueGetter.java
        • /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedField.java
        • /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedFieldCollaborator.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222789
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldAccessTests.groovy
        • /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedField.java
        • /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedFieldCollaborator.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222788
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentation.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentations.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassPool.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticFieldImpl.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222787
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassPool.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticFieldImpl.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222786
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticFieldImpl.java
        • /tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/ObtainPlasticClass.groovy
        • /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/NonPrivateInstanceField.java
        • /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/PublicInstanceField.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #648 (See https://builds.apache.org/job/tapestry-trunk-freestyle/648/ ) TAP5-1801 : Allow non-public fields in instrumented classes Update some tests, due to non-private fields being allowed now TAP5-1801 : Allow non-public fields in instrumented classes Support field instrumentation on accesses from inner classes TAP5-1801 : Allow non-public fields in instrumented classes Add a test for cross-class field access TAP5-1801 : Allow non-public fields in instrumented classes Refactor how file instrumentations are stored in the PlasticClass and in the PlasticClassPool TAP5-1801 : Allow non-public fields in instrumented classes Added most of the logic for tracking instrument methods for fields of classes TAP5-1801 : Allow non-public fields in instrumented classes hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222792 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/CoreBehaviorsTests.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Datum.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ProtectedFields.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222790 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassPool.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/plastic/ClassType.java /tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldAccessTests.groovy /tapestry/tapestry5/trunk/plastic/src/test/java/testinterfaces/ValueGetter.java /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedField.java /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedFieldCollaborator.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222789 Files : /tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldAccessTests.groovy /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedField.java /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/ProtectedFieldCollaborator.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222788 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentation.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentations.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassPool.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticFieldImpl.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222787 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassPool.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticFieldImpl.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222786 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticFieldImpl.java /tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/ObtainPlasticClass.groovy /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/NonPrivateInstanceField.java /tapestry/tapestry5/trunk/plastic/src/test/java/testsubjects/PublicInstanceField.java
        Howard M. Lewis Ship made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Howard M. Lewis Ship made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Fix Version/s 5.3.2 [ 12319260 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in tapestry-5.3-freestyle #4 (See https://builds.apache.org/job/tapestry-5.3-freestyle/4/)
        Do some backporting work for TAP5-1801 from trunk

        mlusetti : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1235046
        Files :

        • /tapestry/tapestry5/branches/5.3
        • /tapestry/tapestry5/branches/5.3/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentation.java
        • /tapestry/tapestry5/branches/5.3/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentations.java
        Show
        Hudson added a comment - Integrated in tapestry-5.3-freestyle #4 (See https://builds.apache.org/job/tapestry-5.3-freestyle/4/ ) Do some backporting work for TAP5-1801 from trunk mlusetti : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1235046 Files : /tapestry/tapestry5/branches/5.3 /tapestry/tapestry5/branches/5.3/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentation.java /tapestry/tapestry5/branches/5.3/plastic/src/main/java/org/apache/tapestry5/internal/plastic/FieldInstrumentations.java

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development