Tapestry 5
  1. Tapestry 5
  2. TAP5-1664

@InjectResource annotation should be removed, behavior of @Inject on a field should be changed to consider resources first

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.2
    • Fix Version/s: 5.3
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      The @InjectResource annotation is confusing and, ultimately, unnecessary. For the rare case where there's a service of type Messages or such, you can always change your constructor to take an ObjectLocator and look up the Messages service that way.

        Activity

        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #539 (See https://builds.apache.org/job/tapestry-trunk-freestyle/539/)
        TAP5-1664: @InjectResource annotation should be removed, behavior of @Inject on a field should be changed to consider resources first

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

        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/UtilMessages.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/util/UtilStrings.properties
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/FailedFieldInjectionStringTransformer.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/FieldResourceInjectionModule.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/IntegrationTest.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/InternalUtilsTest.java
        • /tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/InjectResource.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #539 (See https://builds.apache.org/job/tapestry-trunk-freestyle/539/ ) TAP5-1664 : @InjectResource annotation should be removed, behavior of @Inject on a field should be changed to consider resources first hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1175102 Files : /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/UtilMessages.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/util/UtilStrings.properties /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/FailedFieldInjectionStringTransformer.java /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/FieldResourceInjectionModule.java /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/IntegrationTest.java /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/InternalUtilsTest.java /tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/InjectResource.java
        Hide
        Howard M. Lewis Ship added a comment -

        Deprecated and marked for removal

        Show
        Howard M. Lewis Ship added a comment - Deprecated and marked for removal

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development