You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stefan Bischof (Jira)" <ji...@apache.org> on 2020/03/12 09:19:00 UTC

[jira] [Created] (FELIX-6239) Converter should be able to invoke default methods in Interfaces

Stefan Bischof created FELIX-6239:
-------------------------------------

             Summary: Converter should be able to invoke default methods in Interfaces
                 Key: FELIX-6239
                 URL: https://issues.apache.org/jira/browse/FELIX-6239
             Project: Felix
          Issue Type: New Feature
          Components: Converter
            Reporter: Stefan Bischof


 
{code:java}
 interface InterfaceWithDefault
 {
   default String s()
   {
     return "s";
    }
 }

@Test()
public void testInterfaceWithDefault() throws Exception
{
   InterfaceWithDefault i = Converters.standardConverter().convert(new HashMap<String, Object>()).to(InterfaceWithDefault.class);
   assertEquals("s", i.s());
}
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)