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

Niall Pemberton resolved LANG-506.
----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.x)
                   2.5
         Assignee: Niall Pemberton

Applied the patch (manually) to the 2.x branch

http://svn.apache.org/viewvc?view=revision&revision=905846

> Entities - missing final modifiers; thread-safety issues
> --------------------------------------------------------
>
>                 Key: LANG-506
>                 URL: https://issues.apache.org/jira/browse/LANG-506
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 2.5
>
>         Attachments: entities-506-1.patch, entities-506-2.patch
>
>
> Some fields in Entities are used as constants but they are not final, so can 
> be changed accidentally or maliciously:
> ISO8859_1_ARRAY_LENGTH
> HTML40_ARRAY_LENGTH
> Entities.map should also be final
> Entities.LookupEntityMap.LOOKUP_TABLE_SIZE should be final
> Entities.MapIntMap.mapValueToName and mapNameToValue would benefit from being 
> made final.
> This would require a constructor to be added that can initialise the Maps.
> LookupEntityMap is not thread-safe - it creates the lookup table without 
> synchronisation, and mutates it after initial creation.
> Entities.ArrayEntityMap.growBy should be final
> As far as possible, all instance fields to be made final.
> Patch to follow

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to