[ https://issues.apache.org/jira/browse/FELIX-6239?focusedWorklogId=405659&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-405659 ]
ASF GitHub Bot logged work on FELIX-6239: ----------------------------------------- Author: ASF GitHub Bot Created on: 18/Mar/20 18:17 Start Date: 18/Mar/20 18:17 Worklog Time Spent: 10m Work Description: stbischof commented on pull request #10: [converter] handle default methods - FELIX-6239 URL: https://github.com/apache/felix-dev/pull/10 https://issues.apache.org/jira/browse/FELIX-6239 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 405659) Remaining Estimate: 0h Time Spent: 10m > 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 > Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > Would be nice if Converter could invoke default methods in Interfaces. > https://github.com/apache/felix-dev/blob/f4304bdea3fb9280ccc0b75dc97275125bc5cbfb/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L807-L820 > I didn't found a proper way to invoke default methods <= and > Java 8. > Test: > {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)