[
https://issues.apache.org/jira/browse/LANG-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15395066#comment-15395066
]
ASF GitHub Bot commented on LANG-1251:
--------------------------------------
GitHub user ueshin opened a pull request:
https://github.com/apache/commons-lang/pull/180
LANG-1251: SerializationUtils.ClassLoaderAwareObjectInputStream should use
static initializer to initialize primitiveTypes map.
`SerializationUtils.ClassLoaderAwareObjectInputStream` should use static
initializer to initialize `primitiveTypes` map because initializing the map in
the constructor of `ClassLoaderAwareObjectInputStream` would break thread
safety. `java.util.HashMap` is not thread safe.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ueshin/apache-commons-lang issues/LANG-1251
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/180.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #180
----
commit c8cf32f8f242f8a2b17865fee58b71c04db6b908
Author: Takuya UESHIN <[email protected]>
Date: 2016-07-27T05:00:46Z
Modify to use static initializer to initialize primitiveTypes map.
----
> SerializationUtils.ClassLoaderAwareObjectInputStream should use static
> initializer to initialize primitiveTypes map.
> --------------------------------------------------------------------------------------------------------------------
>
> Key: LANG-1251
> URL: https://issues.apache.org/jira/browse/LANG-1251
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.2, 3.3, 3.4
> Reporter: Takuya Ueshin
>
> {{SerializationUtils.ClassLoaderAwareObjectInputStream}} should use static
> initializer to initialize {{primitiveTypes}} map because initializing the map
> in the constructor of {{ClassLoaderAwareObjectInputStream}} would break
> thread safety. {{java.util.HashMap}} is not thread safe.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)