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

        There are no comments yet on this 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