commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1170) Data Race in StringEscapeUtils.escapeXml
Date Wed, 23 Sep 2015 09:52:05 GMT

    [ https://issues.apache.org/jira/browse/LANG-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14904272#comment-14904272
] 

Sebb commented on LANG-1170:
----------------------------

Note that version 2.6 is a legacy release; it is 4 years old.

Please consider upgrading to 3.4.

> 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:
>   private String[] lookupTable() {
>             if (lookupTable == null) {
>                 createLookupTable();
>             }
>             return lookupTable;
>         }
> Here are the stacktraces from my test:
> 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
> Data Race was found using http://vmlens.com



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

Mime
View raw message