[felix-dev] branch master updated: Convert to Interface without methods - FELIX-6238
This is an automated email from the ASF dual-hosted git repository. davidb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/felix-dev.git The following commit(s) were added to refs/heads/master by this push: new 9f29bc8 Convert to Interface without methods - FELIX-6238 new 29ccc55 Merge pull request #9 from stbischof/conv_int_empt 9f29bc8 is described below commit 9f29bc82aa688c38b9b74b79ccd2d50ae0a8abac Author: Stefan Bischof AuthorDate: Tue Mar 17 15:24:51 2020 +0100 Convert to Interface without methods - FELIX-6238 --- .../org/osgi/util/converter/ConvertingImpl.java| 6 - .../org/osgi/util/converter/ConverterTest.java | 29 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java b/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java index fc409d2..c9e3722 100644 --- a/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java +++ b/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java @@ -1126,11 +1126,15 @@ class ConvertingImpl extends AbstractSpecifying Set> interfaces = getInterfaces0(cls); outer: for (Iterator> it = interfaces.iterator(); it.hasNext();) { Class< ? > intf = it.next(); - for (Method method : intf.getMethods()) { + Method[] methods=intf.getMethods(); + for (Method method : methods) { if(method.getDeclaringClass() == intf) { continue outer; } } + if(intf==cls&&methods.length==0) { + continue outer; + } it.remove(); } diff --git a/converter/converter/src/test/java/org/osgi/util/converter/ConverterTest.java b/converter/converter/src/test/java/org/osgi/util/converter/ConverterTest.java index 9b4615e..ef00c13 100644 --- a/converter/converter/src/test/java/org/osgi/util/converter/ConverterTest.java +++ b/converter/converter/src/test/java/org/osgi/util/converter/ConverterTest.java @@ -1451,11 +1451,40 @@ public class ConverterTest { assertEquals(Integer.valueOf(0), inter.value()); } +@Test +public void testMapToEmptyInterface() throws Exception { +Map map = new HashMap(); +map.put("a", "b"); +EmptyInterface i = Converters.standardConverter().convert(map).to(EmptyInterface.class); +assertNotNull(i); + +EmptyInterface2 j = Converters.standardConverter().convert(map).to(EmptyInterface2.class); +assertNotNull(j); + +EmptyInterface3 k = Converters.standardConverter().convert(map).to(EmptyInterface3.class); +assertNotNull(k); +} + static interface MyIntf2 { String code(); Integer value(); } +static interface EmptyInterface +{ +} + +static interface EmptyInterface2 extends EmptyInterface +{ +} +static interface NonEmptyInterface +{ + int a(); +} + +static interface EmptyInterface3 extends NonEmptyInterface +{ +} static class MyClass2 { private final String value; public MyClass2(String v) {
[felix-dev] branch master updated: FELIX-6230 : Update dependencies to newer versions
This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/felix-dev.git The following commit(s) were added to refs/heads/master by this push: new f0a65c7 FELIX-6230 : Update dependencies to newer versions f0a65c7 is described below commit f0a65c7bf694b41ddb708709ecc447654236380a Author: Carsten Ziegeler AuthorDate: Wed Mar 18 14:29:39 2020 +0100 FELIX-6230 : Update dependencies to newer versions --- ipojo/distributions/ipojo-webconsole-quicktart/pom.xml| 4 ++-- ipojo/handler/eventadmin/eventadmin-handler-it/pom.xml| 4 ++-- ipojo/handler/jmx/jmx-handler-it/pom.xml | 4 ++-- ipojo/handler/temporal/temporal-dependency-handler-it/pom.xml | 4 ++-- ipojo/handler/transaction/transaction-handler-it/pom.xml | 4 ++-- ipojo/handler/whiteboard/whiteboard-handler-it/pom.xml| 4 ++-- ipojo/manipulator/ipojo-ant-task/pom.xml | 2 +- ipojo/manipulator/manipulator-it/pom.xml | 4 ++-- ipojo/runtime/composite-it/pom.xml| 4 ++-- ipojo/runtime/core-it/pom.xml | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml index 93750ab..7b84c5b 100644 --- a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml +++ b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml @@ -106,7 +106,7 @@ commons-fileupload commons-fileupload -1.2.2 +1.4 @@ -145,4 +145,4 @@ - \ No newline at end of file + diff --git a/ipojo/handler/eventadmin/eventadmin-handler-it/pom.xml b/ipojo/handler/eventadmin/eventadmin-handler-it/pom.xml index f8983a5..20f637e 100644 --- a/ipojo/handler/eventadmin/eventadmin-handler-it/pom.xml +++ b/ipojo/handler/eventadmin/eventadmin-handler-it/pom.xml @@ -110,14 +110,14 @@ ch.qos.logback logback-core -0.9.20 +1.2.0 test ch.qos.logback logback-classic -0.9.20 +1.2.0 test diff --git a/ipojo/handler/jmx/jmx-handler-it/pom.xml b/ipojo/handler/jmx/jmx-handler-it/pom.xml index 231e621..d39c41b 100644 --- a/ipojo/handler/jmx/jmx-handler-it/pom.xml +++ b/ipojo/handler/jmx/jmx-handler-it/pom.xml @@ -109,14 +109,14 @@ ch.qos.logback logback-core -0.9.20 +1.2.0 test ch.qos.logback logback-classic -0.9.20 +1.2.0 test diff --git a/ipojo/handler/temporal/temporal-dependency-handler-it/pom.xml b/ipojo/handler/temporal/temporal-dependency-handler-it/pom.xml index ca8f175..0b34cf8 100644 --- a/ipojo/handler/temporal/temporal-dependency-handler-it/pom.xml +++ b/ipojo/handler/temporal/temporal-dependency-handler-it/pom.xml @@ -110,14 +110,14 @@ ch.qos.logback logback-core -0.9.20 +1.2.0 test ch.qos.logback logback-classic -0.9.20 +1.2.0 test diff --git a/ipojo/handler/transaction/transaction-handler-it/pom.xml b/ipojo/handler/transaction/transaction-handler-it/pom.xml index cc38ec7..2d0364a 100644 --- a/ipojo/handler/transaction/transaction-handler-it/pom.xml +++ b/ipojo/handler/transaction/transaction-handler-it/pom.xml @@ -130,14 +130,14 @@ ch.qos.logback logback-core -0.9.20 +1.2.0 test ch.qos.logback logback-classic -0.9.20 +1.2.0 test diff --git a/ipojo/handler/whiteboard/whiteboard-handler-it/pom.xml b/ipojo/handler/whiteboard/whiteboard-handler-it/pom.xml index c2d764d..b1b17f0 100644 --- a/ipojo/handler/whiteboard/whiteboard-handler-it/pom.xml +++ b/ipojo/handler/whiteboard/whiteboard-handler-it/pom.xml @@ -105,14 +105,14 @@ ch.qos.logback logback-core -0.9.20 +1.2.0 test ch.qos.logback logback-classic -0.9.20 +1.2.0 test diff --git a/ipojo/manipulator/ipojo-ant-task/pom.xml b/ipojo/manipulator/ipojo-ant-task/pom.xml index dae6707..06813a4 100644 --- a/ipojo/manipulator/ipojo-ant-task/pom.xml +++ b/ipojo/manipulator/ipojo-ant-task/pom.xml @@ -49,7 +49,7 @@ xerces xercesImpl -2.9.1 +2.12.0 ant di
[felix-dev] branch master updated: FELIX-6230 : Update dependencies to newer versions
This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/felix-dev.git The following commit(s) were added to refs/heads/master by this push: new e2f22cb FELIX-6230 : Update dependencies to newer versions e2f22cb is described below commit e2f22cb5919e5ecb76589f8966e02b2e19c5b0f0 Author: Carsten Ziegeler AuthorDate: Wed Mar 18 14:19:47 2020 +0100 FELIX-6230 : Update dependencies to newer versions --- ipojo/manipulator/maven-ipojo-plugin/pom.xml | 7 +-- useradmin/filestore/pom.xml | 2 +- useradmin/itest/pom.xml | 4 ++-- useradmin/mongodb/pom.xml| 4 ++-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ipojo/manipulator/maven-ipojo-plugin/pom.xml b/ipojo/manipulator/maven-ipojo-plugin/pom.xml index 7f5734a..7f1b1da 100644 --- a/ipojo/manipulator/maven-ipojo-plugin/pom.xml +++ b/ipojo/manipulator/maven-ipojo-plugin/pom.xml @@ -51,7 +51,7 @@ org.codehaus.plexus plexus-utils -2.0.5 +3.0.16 org.apache.maven @@ -64,11 +64,6 @@ 2.0.4 -xerces -xercesImpl -2.9.1 - - org.apache.felix org.apache.felix.ipojo.metadata diff --git a/useradmin/filestore/pom.xml b/useradmin/filestore/pom.xml index 689d1d1..b7f1005 100644 --- a/useradmin/filestore/pom.xml +++ b/useradmin/filestore/pom.xml @@ -43,7 +43,7 @@ org.apache.felix org.apache.felix.useradmin - 1.0.4-SNAPSHOT + 1.0.7-SNAPSHOT bundle diff --git a/useradmin/itest/pom.xml b/useradmin/itest/pom.xml index 505c241..3de6b1e 100644 --- a/useradmin/itest/pom.xml +++ b/useradmin/itest/pom.xml @@ -32,7 +32,7 @@ 1.2.4 1.4.0 1.3.1 -1.7.6 +1.9.0 org.apache.felix.useradmin.itest 1.0.0-SNAPSHOT @@ -47,7 +47,7 @@ org.apache.felix org.apache.felix.useradmin -1.0.4-SNAPSHOT +1.0.7-SNAPSHOT test diff --git a/useradmin/mongodb/pom.xml b/useradmin/mongodb/pom.xml index 319bc2e..89b2f2e 100644 --- a/useradmin/mongodb/pom.xml +++ b/useradmin/mongodb/pom.xml @@ -48,7 +48,7 @@ org.apache.felix org.apache.felix.useradmin -1.0.4-SNAPSHOT +1.0.7-SNAPSHOT bundle @@ -104,4 +104,4 @@ - \ No newline at end of file +