You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "A. J. David Bosschaert (Jira)" <ji...@apache.org> on 2020/03/18 16:19:00 UTC
[jira] [Assigned] (FELIX-6238) Convert to Interface without methods
without Exception
[ https://issues.apache.org/jira/browse/FELIX-6238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
A. J. David Bosschaert reassigned FELIX-6238:
---------------------------------------------
Assignee: Stefan Bischof
> Convert to Interface without methods without Exception
> ------------------------------------------------------
>
> Key: FELIX-6238
> URL: https://issues.apache.org/jira/browse/FELIX-6238
> Project: Felix
> Issue Type: Bug
> Components: Converter
> Reporter: Stefan Bischof
> Assignee: Stefan Bischof
> Priority: Critical
> Time Spent: 20m
> Remaining Estimate: 0h
>
>
> Converter should Convert to an Interface without methods without Exception
> Example
> {code:java}
> public interface I
> {
> }{code}
>
> {code:java}
> I i = Converters.standardConverter()
> .convert(Map.of("a", "b"))
> .to(I.class);{code}
> throws Exception:
> {code:java}
> org.osgi.util.converter.ConversionException: Cannot convert a to interface org.apache.felix.atomos.substrate.core.I
> at org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:212)
> at org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
> at org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
> at org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.convertMapEntryToSingleValue(ConvertingImpl.java:260)
> at org.osgi.util.converter@1.0.1/org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:197)
> at org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:176)
> at org.osgi.util.converter@1.0.1/org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
>
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)