Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
5.1.0.5
-
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.