Tapestry 5
  1. Tapestry 5
  2. TAP5-1014

Message about missing or wrong retention policy of a marker annotation is misleading

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.5
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      Using another renetion policy policy than RUNTIME for a marker annotation leads to the following exception

      Caused by: java.lang.IllegalArgumentException: Marker annotation class org.example.Blue is not valid because it is not visible at runtime. Add a @RetentionPolicy(RUNTIME) to the class.
      at org.apache.tapestry5.ioc.internal.util.InternalUtils.validateMarkerAnnotation(InternalUtils.java:698)
      at org.apache.tapestry5.ioc.internal.util.InternalUtils.validateMarkerAnnotations(InternalUtils.java:703)
      at org.apache.tapestry5.ioc.internal.ServiceBinderImpl.withMarker(ServiceBinderImpl.java:292)

      A proper mesage is:

      Add a @Retention(RetentionPolicy.RUNTIME) to the class.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        21d 12h 56m 1 Igor Drobiazko 05/Mar/10 22:15
        Igor Drobiazko made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.2.0 [ 12314122 ]
        Resolution Fixed [ 1 ]
        Igor Drobiazko made changes -
        Field Original Value New Value
        Assignee Igor Drobiazko [ igor.drobiazko ]
        Igor Drobiazko created issue -

          People

          • Assignee:
            Igor Drobiazko
            Reporter:
            Igor Drobiazko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development