[felix-dev] branch master updated: FELIX-6402 don't swallow exception when converting to array
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 18aa59f FELIX-6402 don't swallow exception when converting to array new b178fda Merge pull request #74 from kwin/FELIX-6402_dont-swallow-CME 18aa59f is described below commit 18aa59f1e05a25ef510a29f20f96922dfb6ebd94 Author: Konrad Windszus AuthorDate: Tue May 4 16:47:42 2021 +0200 FELIX-6402 don't swallow exception when converting to array --- .../org/osgi/util/converter/ConvertingImpl.java| 8 +++--- .../org/osgi/util/converter/ConverterTest.java | 33 ++ 2 files changed, 37 insertions(+), 4 deletions(-) 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 71e333a..87410a8 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 @@ -297,20 +297,20 @@ class ConvertingImpl extends AbstractSpecifying @SuppressWarnings("unchecked") private T convertToArray(Class< ? > componentClz, Type componentType, InternalConverter c) { Collection< ? > collectionView = collectionView(c); - Iterator< ? > itertor = collectionView.iterator(); + Iterator< ? > iterator = collectionView.iterator(); try { Object array = Array.newInstance(componentClz, collectionView.size()); for (int i = 0; i < collectionView.size() - && itertor.hasNext(); i++) { - Object next = itertor.next(); + && iterator.hasNext(); i++) { + Object next = iterator.next(); Object converted = c.convert(next) .to(componentType); Array.set(array, i, converted); } return (T) array; } catch (Exception e) { - return null; + throw new ConversionException("Cannot iterate over " + collectionView.getClass(), e); } } 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 b635edf..f92205e 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 @@ -50,6 +50,7 @@ import java.util.Arrays; import java.util.Calendar; import java.util.Collection; import java.util.Collections; +import java.util.ConcurrentModificationException; import java.util.Date; import java.util.Deque; import java.util.GregorianCalendar; @@ -388,6 +389,38 @@ public class ConverterTest { checkArray(double[][][].class); } +@Test +public void testPropagatingExceptionInArray() { +try { +Set concurrentModificationSet = new HashSet() { +private static final long serialVersionUID = 1L; + +@Override +public Iterator iterator() { +return new Iterator() { + +@Override +public boolean hasNext() { +return true; +} + +@Override +public String next() { +throw new ConcurrentModificationException("This iterator deliberately throws CMEs!"); +} +}; +} + +}; +concurrentModificationSet.add("one"); +concurrentModificationSet.add("two"); +converter.convert(concurrentModificationSet).to(String[].class); +fail("Should have thrown a Conversion Exception when a collection throwing a CME was used as source"); +} catch (ConversionException e) { +// good +} +} + private void checkArray(Class arrayType) { assertTrue(arrayType.isArray());
[felix-dev] branch master updated: [maven-release-plugin] prepare for next development iteration
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 23feae7 [maven-release-plugin] prepare for next development iteration 23feae7 is described below commit 23feae731ac1afdf1617b56cc9df8f5178eaea55 Author: Carsten Ziegeler AuthorDate: Tue May 4 15:52:28 2021 +0200 [maven-release-plugin] prepare for next development iteration --- configadmin/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configadmin/pom.xml b/configadmin/pom.xml index a14d1cf..d310b97 100644 --- a/configadmin/pom.xml +++ b/configadmin/pom.xml @@ -27,7 +27,7 @@ org.apache.felix.configadmin -1.9.22 +1.9.23-SNAPSHOT bundle Apache Felix Configuration Admin Service @@ -39,7 +39,7 @@ scm:git:https://github.com/apache/felix-dev.git scm:git:https://github.com/apache/felix-dev.git https://gitbox.apache.org/repos/asf?p=felix-dev.git - org.apache.felix.configadmin-1.9.22 + HEAD
[felix-dev] annotated tag org.apache.felix.configadmin-1.9.22 updated (e683130 -> 396ace8)
This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a change to annotated tag org.apache.felix.configadmin-1.9.22 in repository https://gitbox.apache.org/repos/asf/felix-dev.git. *** WARNING: tag org.apache.felix.configadmin-1.9.22 was modified! *** from e683130 (commit) to 396ace8 (tag) tagging e683130a194a8b769b0e5066e7e7025540610d23 (commit) replaces org.apache.felix.http.jetty-4.1.8 by Carsten Ziegeler on Tue May 4 15:52:24 2021 +0200 - Log - [maven-release-plugin] copy for tag org.apache.felix.configadmin-1.9.22 --- No new revisions were added by this update. Summary of changes:
[felix-dev] branch master updated: [maven-release-plugin] prepare release org.apache.felix.configadmin-1.9.22
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 e683130 [maven-release-plugin] prepare release org.apache.felix.configadmin-1.9.22 e683130 is described below commit e683130a194a8b769b0e5066e7e7025540610d23 Author: Carsten Ziegeler AuthorDate: Tue May 4 15:46:12 2021 +0200 [maven-release-plugin] prepare release org.apache.felix.configadmin-1.9.22 --- configadmin/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configadmin/pom.xml b/configadmin/pom.xml index 91c3eff..a14d1cf 100644 --- a/configadmin/pom.xml +++ b/configadmin/pom.xml @@ -27,7 +27,7 @@ org.apache.felix.configadmin -1.9.21-SNAPSHOT +1.9.22 bundle Apache Felix Configuration Admin Service @@ -39,7 +39,7 @@ scm:git:https://github.com/apache/felix-dev.git scm:git:https://github.com/apache/felix-dev.git https://gitbox.apache.org/repos/asf?p=felix-dev.git - HEAD + org.apache.felix.configadmin-1.9.22
[felix-dev] branch master updated: FELIX-6406 : Exception when parsing multi-line configurations
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 2b02482 FELIX-6406 : Exception when parsing multi-line configurations 2b02482 is described below commit 2b02482d41dd02a97bccedd644a0c268008487bf Author: Carsten Ziegeler AuthorDate: Tue May 4 15:23:39 2021 +0200 FELIX-6406 : Exception when parsing multi-line configurations --- .../apache/felix/cm/file/ConfigurationHandler.java | 4 +-- .../felix/cm/file/ConfigurationHandlerTest.java| 40 ++ 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/configadmin/src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java b/configadmin/src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java index 0883987..5712599 100644 --- a/configadmin/src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java +++ b/configadmin/src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java @@ -297,7 +297,7 @@ public class ConfigurationHandler token = 0; while ( nextToken( pr, true ) == TOKEN_NAME ) { -String key = tokenValue; +String key = tokenValue.trim(); // expect equal sign if ( nextToken( pr, false ) != TOKEN_EQ ) @@ -559,7 +559,6 @@ public class ConfigurationHandler case -1: // fall through // separator token -case TOKEN_SPACE: case TOKEN_EQ: case TOKEN_VAL_CLOS: pr.unread( c ); @@ -650,7 +649,6 @@ public class ConfigurationHandler return c; } - private int read( PushbackReader pr ) throws IOException { int c = pr.read(); diff --git a/configadmin/src/test/java/org/apache/felix/cm/file/ConfigurationHandlerTest.java b/configadmin/src/test/java/org/apache/felix/cm/file/ConfigurationHandlerTest.java index 831b225..b1effc5 100644 --- a/configadmin/src/test/java/org/apache/felix/cm/file/ConfigurationHandlerTest.java +++ b/configadmin/src/test/java/org/apache/felix/cm/file/ConfigurationHandlerTest.java @@ -25,6 +25,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import java.util.Arrays; import java.util.Dictionary; import java.util.Hashtable; import java.util.List; @@ -48,6 +49,36 @@ public class ConfigurationHandlerTest { " # custom datastore\n" + PAR_2 + "=B\"" + VAL_2 + "\"\n"; +private static final String MULTI_LINE_CONFIG = "# Licensed to the Apache Software Foundation (ASF) under one or more\n" ++ "# contributor license agreements. See the NOTICE file distributed with this\n" ++ "# work for additional information regarding copyright ownership. The ASF\n" ++ "# licenses this file to You under the Apache License, Version 2.0 (the\n" ++ "# \"License\"); you may not use this file except in compliance with the License.\n" ++ "# You may obtain a copy of the License at\n" ++ "#\n" ++ "# http://www.apache.org/licenses/LICENSE-2.0\n; ++ "#\n" ++ "# Unless required by applicable law or agreed to in writing, software\n" ++ "# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n" ++ "# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n" ++ "# License for the specific language governing permissions and limitations under\n" ++ "# the License.\n" ++ "\n" ++ "scripts=[\\\n" ++ "\"create service user test-user\n" ++ "set ACL for test-user\n" ++ "allowjcr:readon /conf\n" ++ "end\",\\\n" ++ "\"create service user test-user2\n" ++ "set ACL for test-user2\n" ++ "allowjcr:readon /conf\n" ++ "end\",\\\n" ++ "\"create path /test\n" ++ "set properties on /test\n" ++ "set testprop to \\\"one\\=two\\\"\n" ++ "end\"\\\n" ++ "]"; + @Test public void testComments() throws IOException { @@ -58,6 +89,15 @@ public class ConfigurationHandlerTest { Assert.assertEquals(VAL_2, dict.get(PAR_2).toString()); } +@Test +public void testMultiLineConfig() throws IOException +{ +@SuppressWarnings("unchecked") +final Dictionary dict = ConfigurationHandler.read(new ByteArrayInputStream(MULTI_LINE_CONFIG.getBytes("UTF-8"))); +final String[] scripts = (String[]) dict.get("scripts"); +Assert.assertNotNull(scripts); +Assert.assertEquals(3, scripts.length); +} @Test public void test_writeArray() throws IOException {
[felix-dev] branch master updated: [maven-release-plugin] prepare for next development iteration
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 7aca0f9 [maven-release-plugin] prepare for next development iteration 7aca0f9 is described below commit 7aca0f9a4777ad32a1ad613bed635a3b599292aa Author: Carsten Ziegeler AuthorDate: Tue May 4 09:16:09 2021 +0200 [maven-release-plugin] prepare for next development iteration --- http/jetty/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml index dbd4992..242e06b 100644 --- a/http/jetty/pom.xml +++ b/http/jetty/pom.xml @@ -30,14 +30,14 @@ This is an implementation of the R7 OSGi Http Service and the R7 OSGi Http Whiteboard Specification org.apache.felix.http.jetty -4.1.8 +4.1.9-SNAPSHOT bundle scm:git:https://github.com/apache/felix-dev.git scm:git:https://github.com/apache/felix-dev.git https://gitbox.apache.org/repos/asf?p=felix-dev.git - org.apache.felix.http.jetty-4.1.8 + HEAD
[felix-dev] annotated tag org.apache.felix.http.jetty-4.1.8 updated (ddcfaf0 -> 5cc75f6)
This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a change to annotated tag org.apache.felix.http.jetty-4.1.8 in repository https://gitbox.apache.org/repos/asf/felix-dev.git. *** WARNING: tag org.apache.felix.http.jetty-4.1.8 was modified! *** from ddcfaf0 (commit) to 5cc75f6 (tag) tagging ddcfaf01730206501a8b50a3307ab230773f3f06 (commit) replaces org.apache.felix.utils-1.11.8 by Carsten Ziegeler on Tue May 4 09:16:04 2021 +0200 - Log - [maven-release-plugin] copy for tag org.apache.felix.http.jetty-4.1.8 --- No new revisions were added by this update. Summary of changes:
[felix-dev] branch master updated (5c1b9fa -> ddcfaf0)
This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/felix-dev.git. from 5c1b9fa FELIX-6405 : Update Jetty version to 9.4.40 add ddcfaf0 [maven-release-plugin] prepare release org.apache.felix.http.jetty-4.1.8 No new revisions were added by this update. Summary of changes: http/jetty/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[felix-dev] branch master updated: FELIX-6405 : Update Jetty version to 9.4.40
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 5c1b9fa FELIX-6405 : Update Jetty version to 9.4.40 5c1b9fa is described below commit 5c1b9faed2fa512680bb65d5661268377de0c888 Author: Carsten Ziegeler AuthorDate: Tue May 4 09:14:50 2021 +0200 FELIX-6405 : Update Jetty version to 9.4.40 --- http/jetty/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml index d5f5089..7674773 100644 --- a/http/jetty/pom.xml +++ b/http/jetty/pom.xml @@ -30,7 +30,7 @@ This is an implementation of the R7 OSGi Http Service and the R7 OSGi Http Whiteboard Specification org.apache.felix.http.jetty -4.1.9-SNAPSHOT +4.1.7-SNAPSHOT bundle @@ -42,7 +42,7 @@ 8 -9.4.39.v20210325 +9.4.40.v20210413
[felix-dev] branch master updated: [maven-release-plugin] prepare for next development iteration
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 1499b19 [maven-release-plugin] prepare for next development iteration 1499b19 is described below commit 1499b19912b727ad2eeac9dac2f3c8c7d492a53e Author: Carsten Ziegeler AuthorDate: Tue May 4 08:53:43 2021 +0200 [maven-release-plugin] prepare for next development iteration --- http/jetty/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml index f49b4a1..d5f5089 100644 --- a/http/jetty/pom.xml +++ b/http/jetty/pom.xml @@ -30,14 +30,14 @@ This is an implementation of the R7 OSGi Http Service and the R7 OSGi Http Whiteboard Specification org.apache.felix.http.jetty -4.1.8 +4.1.9-SNAPSHOT bundle scm:git:https://github.com/apache/felix-dev.git scm:git:https://github.com/apache/felix-dev.git https://gitbox.apache.org/repos/asf?p=felix-dev.git - org.apache.felix.http.jetty-4.1.8 + HEAD
[felix-dev] annotated tag org.apache.felix.http.jetty-4.1.8 updated (b0c1196 -> 4874cc0)
This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a change to annotated tag org.apache.felix.http.jetty-4.1.8 in repository https://gitbox.apache.org/repos/asf/felix-dev.git. *** WARNING: tag org.apache.felix.http.jetty-4.1.8 was modified! *** from b0c1196 (commit) to 4874cc0 (tag) tagging b0c1196e13061fd964fcd3d90ae6f5f91abe9fa2 (commit) replaces org.apache.felix.utils-1.11.8 by Carsten Ziegeler on Tue May 4 08:53:39 2021 +0200 - Log - [maven-release-plugin] copy for tag org.apache.felix.http.jetty-4.1.8 --- No new revisions were added by this update. Summary of changes:
[felix-dev] branch master updated (b54de6e -> b0c1196)
This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/felix-dev.git. from b54de6e FELIX-6405 : Update Jetty version to 9.4.39 add b0c1196 [maven-release-plugin] prepare release org.apache.felix.http.jetty-4.1.8 No new revisions were added by this update. Summary of changes: http/jetty/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[felix-dev] branch master updated: FELIX-6405 : Update Jetty version to 9.4.39
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 b54de6e FELIX-6405 : Update Jetty version to 9.4.39 b54de6e is described below commit b54de6ead01cd8bcadf64085647c7874b49b1fbf Author: Carsten Ziegeler AuthorDate: Tue May 4 08:51:37 2021 +0200 FELIX-6405 : Update Jetty version to 9.4.39 --- http/jetty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml index e5bfe87..23e98e7 100644 --- a/http/jetty/pom.xml +++ b/http/jetty/pom.xml @@ -42,7 +42,7 @@ 8 -9.4.38.v20210224 +9.4.39.v20210325