You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/10/17 00:37:05 UTC

[jira] [Closed] (LANG-1170) Data Race in StringEscapeUtils.escapeXml

     [ https://issues.apache.org/jira/browse/LANG-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb closed LANG-1170.
----------------------

> Data Race in StringEscapeUtils.escapeXml
> ----------------------------------------
>
>                 Key: LANG-1170
>                 URL: https://issues.apache.org/jira/browse/LANG-1170
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 2.6
>         Environment: Windows JDK 1.8
>            Reporter: Thomas Krieger
>            Priority: Minor
>
> Calling StringEscapeUtils.escapeXml from many threads creates a data race in the methods:
> {code:java}
>   private String[] lookupTable() {
>             if (lookupTable == null) {
>                 createLookupTable();
>             }
>             return lookupTable;
>         }
> {code}
> Here are the stacktraces from my test:
> {code}
> com/anarsoft/MultiThreadedOneInstanceTemplate.run
> com/anarsoft/mit/TestCommonsLang.exec
> org/apache/commons/lang/StringEscapeUtils.escapeXml
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.entityName
> org/apache/commons/lang/Entities$LookupEntityMap.name
> org/apache/commons/lang/Entities$LookupEntityMap.lookupTable
> org/apache/commons/lang/Entities$LookupEntityMap.createLookupTable 
> com/anarsoft/MultiThreadedOneInstanceTemplate.run
> com/anarsoft/mit/TestCommonsLang.exec
> org/apache/commons/lang/StringEscapeUtils.escapeXml
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.entityName
> org/apache/commons/lang/Entities$LookupEntityMap.name
> org/apache/commons/lang/Entities$LookupEntityMap.lookupTable
> {code}
> Data Race was found using http://vmlens.com



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)