You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Raymond Augé (JIRA)" <ji...@apache.org> on 2019/02/13 20:02:00 UTC
[jira] [Commented] (FELIX-6057) Converter doesn't properly handle
PREFIX_ in marker annotations
[ https://issues.apache.org/jira/browse/FELIX-6057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16767540#comment-16767540 ]
Raymond Augé commented on FELIX-6057:
-------------------------------------
Given the marker annotation:
{code}
@Retention(RetentionPolicy.RUNTIME)
public @interface PrefixMarkerAnnotation {
static final String PREFIX_ = "org.foo.bar.";
}
{code}
the following test fails:
{code}
@Test
@PrefixMarkerAnnotation
public void testMarkerAnnotationPrefixToMap() throws Exception {
final Converter converter = Converters.standardConverter();
Method method = getClass().getMethod("testMarkerAnnotationPrefixToMap");
PrefixMarkerAnnotation annotation = method.getDeclaredAnnotation(PrefixMarkerAnnotation.class);
Map<String, Object> map = converter.convert(annotation).to(new TypeReference<Map<String, Object>>() {});
assertTrue((Boolean)map.get("org.foo.bar.prefix.marker.annotation"));
}
{code}
The map contains {{prefix.marker.annotation=true}}.
> Converter doesn't properly handle PREFIX_ in marker annotations
> ---------------------------------------------------------------
>
> Key: FELIX-6057
> URL: https://issues.apache.org/jira/browse/FELIX-6057
> Project: Felix
> Issue Type: Bug
> Components: Converter
> Reporter: Raymond Augé
> Assignee: Raymond Augé
> Priority: Major
> Fix For: converter-1.0.4
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)