Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 79F512004C8 for ; Mon, 9 May 2016 14:52:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 78E20160A0F; Mon, 9 May 2016 12:52:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E7FC41601D4 for ; Mon, 9 May 2016 14:52:13 +0200 (CEST) Received: (qmail 10074 invoked by uid 500); 9 May 2016 12:52:13 -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 10052 invoked by uid 99); 9 May 2016 12:52:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 12:52:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D509C2C1F61 for ; Mon, 9 May 2016 12:52:12 +0000 (UTC) Date: Mon, 9 May 2016 12:52:12 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-1226) StringUtils#normalizeSpace does not trim the string anymore MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 09 May 2016 12:52:14 -0000 [ https://issues.apache.org/jira/browse/LANG-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276319#comment-15276319 ] Sebb commented on LANG-1226: ---------------------------- See LANG-1227 - any XML methods need to be sensitive to the XML spec version. Maybe such methods belong in the XMLCharacter class. StringUtils could have a wrapper that delegates to it. e.g. StringUtils.normalizeXmlSpace(String input, XMLCharacter#enum XML version) { return XMLCharacter.getInstance(version).normalizeSpace(input); } > StringUtils#normalizeSpace does not trim the string anymore > ----------------------------------------------------------- > > Key: LANG-1226 > URL: https://issues.apache.org/jira/browse/LANG-1226 > Project: Commons Lang > Issue Type: Bug > Components: lang.* > Affects Versions: 3.4 > Reporter: Pascal Schumacher > > These work with 3.3.2, but fail with 3.4: > {code} > assertEquals("b", StringUtils.normalizeSpace("\u0000b")); > assertEquals("b", StringUtils.normalizeSpace("b\u0000")); > {code} > Java doc still says "... Additionally #trim(String)} removes control characters (char <= 32) from both ends of this String." -- This message was sent by Atlassian JIRA (v6.3.4#6332)