Carsten Ziegeler created FELIX-6402:
---------------------------------------
Summary: ConcurrentModificationException when converting to an
array
Key: FELIX-6402
URL: https://issues.apache.org/jira/browse/FELIX-6402
Project: Felix
Issue Type: Bug
Components: Converter
Affects Versions: converter-1.0.14
Reporter: Carsten Ziegeler
Fix For: converter-1.0.16
As reported in SLING-10273 it sometimes happens that a conversion to a String[]
results in "null" to be returned by the converter. According to the spec, a
converter will always return a String array (might be empty).
This got traced down in the issue to a ConcurrentModificationException (see
below) which is catched at [1] and then null is returned.
[1]
https://github.com/apache/felix-dev/blob/master/converter/converter/src/main/java/org/osgi/util/converter/ConvertingImpl.java#L312
{noformat}
java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1516)
at
org.osgi.util.converter.ConvertingImpl.convertToArray(ConvertingImpl.java:306)
at org.osgi.util.converter.ConvertingImpl.to(ConvertingImpl.java:207)
at
org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:183)
at
org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:151)
at
org.osgi.util.converter.CustomConverterImpl$ConvertingWrapper.to(CustomConverterImpl.java:139)
at
org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.modifiedService(SlingAuthenticatorServiceListener.java:369)
at
org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.process(SlingAuthenticatorServiceListener.java:280)
at
org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.processQueue(SlingAuthenticatorServiceListener.java:257)
at
org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.lambda$schedule$0(SlingAuthenticatorServiceListener.java:166)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)