[
https://issues.apache.org/jira/browse/KARAF-6337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16925069#comment-16925069
]
ASF subversion and git services commented on KARAF-6337:
--------------------------------------------------------
Commit 03eb30a68e759036fa6333c4f8219da35eee517f in karaf's branch
refs/heads/karaf-4.2.x from Rico Neubauer
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=03eb30a ]
[KARAF-6337] Prevent ConcurrentModificationException
when iterating over system properties
(cherry picked from commit df405bd50660a8abbc0ee33fde536c35b9fe5c5e)
> ConcurrentModificationException when executing commands
> -------------------------------------------------------
>
> Key: KARAF-6337
> URL: https://issues.apache.org/jira/browse/KARAF-6337
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.5, 4.2.6
> Reporter: Rico Neubauer
> Assignee: Jean-Baptiste Onofré
> Priority: Minor
> Fix For: 4.3.0, 4.2.7
>
>
> Issuing commands via bin/client concurrently may give the error below.
>
>
> {noformat}
> org.apache.karaf.shell.ssh.ShellCommand Thread-280
> [org.apache.karaf.shell.ssh:4.2.5] Unable to start shell
> java.util.ConcurrentModificationException: null
> at java.util.Hashtable$Enumerator.next(Hashtable.java:1387) ~[?:?]
> at
> org.apache.karaf.shell.impl.console.HeadlessSessionImpl.<init>(HeadlessSessionImpl.java:71)
> ~[?:?]
> at
> org.apache.karaf.shell.impl.console.SessionFactoryImpl.create(SessionFactoryImpl.java:178)
> ~[?:?]
> at
> org.apache.karaf.shell.impl.console.SessionFactoryImpl.create(SessionFactoryImpl.java:169)
> ~[?:?]
> at org.apache.karaf.shell.ssh.ShellCommand.run(ShellCommand.java:102) ~[?:?]
> at java.lang.Thread.run(Thread.java:748) [?:?]{noformat}
> This is the code:
> {code:java}
> if (parent == null) {
> Properties sysProps = System.getProperties();
> for (Object key : sysProps.keySet()) { // line 71
> session.put(key.toString(), sysProps.get(key));
> }
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)