Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 50859 invoked from network); 6 Jun 2009 08:48:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Jun 2009 08:48:21 -0000 Received: (qmail 44720 invoked by uid 500); 6 Jun 2009 08:48:32 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 44645 invoked by uid 500); 6 Jun 2009 08:48:32 -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 44630 invoked by uid 99); 6 Jun 2009 08:48:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jun 2009 08:48:32 +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; Sat, 06 Jun 2009 08:48:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 12F02234C004 for ; Sat, 6 Jun 2009 01:48:08 -0700 (PDT) Message-ID: <754911302.1244278088065.JavaMail.jira@brutus> Date: Sat, 6 Jun 2009 01:48:08 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (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:comment-tabpanel&focusedCommentId=12716851#action_12716851 ] Henri Yandell commented on LANG-506: ------------------------------------ Planning to delete Entities. > 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 > Reporter: Sebb > Fix For: 3.0 > > 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.