Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 46208 invoked from network); 3 Feb 2010 00:23:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2010 00:23:43 -0000 Received: (qmail 94355 invoked by uid 500); 3 Feb 2010 00:23:43 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 94247 invoked by uid 500); 3 Feb 2010 00:23:42 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 94237 invoked by uid 99); 3 Feb 2010 00:23:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 00:23:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 00:23:40 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D19E8234C495 for ; Tue, 2 Feb 2010 16:23:18 -0800 (PST) Message-ID: <1090730118.40661265156598857.JavaMail.jira@brutus.apache.org> Date: Wed, 3 Feb 2010 00:23:18 +0000 (UTC) From: "Niall Pemberton (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (LANG-506) Entities - missing final modifiers; thread-safety issues In-Reply-To: <731622498.1242648825684.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.