Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 68674 invoked from network); 25 Jun 2009 07:17:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 07:17:19 -0000 Received: (qmail 41797 invoked by uid 500); 25 Jun 2009 07:17:29 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 41694 invoked by uid 500); 25 Jun 2009 07:17:29 -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 41684 invoked by uid 99); 25 Jun 2009 07:17:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 07:17:29 +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; Thu, 25 Jun 2009 07:17:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 540CD234C045 for ; Thu, 25 Jun 2009 00:17:07 -0700 (PDT) Message-ID: <1634734241.1245914227337.JavaMail.jira@brutus> Date: Thu, 25 Jun 2009 00:17:07 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-505) Rewrite StringEscapeUtils In-Reply-To: <872341825.1242627525543.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-505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723925#action_12723925 ] Henri Yandell commented on LANG-505: ------------------------------------ Performance an issue however as expected. StringEscapeUtilsTest has moved from 0.4 seconds to 1.9 seconds. Presumably this is going to be because the LookupTranslator sits on top of arrays and not the IntHashMap. Also presumably there is some small cost to having more objects at play here. > Rewrite StringEscapeUtils > ------------------------- > > Key: LANG-505 > URL: https://issues.apache.org/jira/browse/LANG-505 > Project: Commons Lang > Issue Type: Task > Reporter: Henri Yandell > Fix For: 3.0 > > Attachments: LANG-505.diff, LANG-505.diff > > > I think StringEscapeUtils needs a strong rewrite. For each escape method (and unescape) there tend to be three or four types of escaping happening. So not being able to define which set of three or four apply is a pain point (and cause of bug reports due to different desired features). > We should be offering basic functionality, but also allowing people to say "escape(Escapers.BASIC_XML, Escapers.LOW_UNICODE, Escapers.HIGH_UNICODE)". > Also should delete escapeSql; it's a bad one imo. Dangerous in that it will lead people to not use PreparedStatement and given it only escapes ', it's not much use. Especially as different dialects escape that in different ways. > Opening this ticket for discussion. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.