commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Jones (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LANG-1056) StringEscapeUtils.unescapeHtml4 java.lang.IllegalArgumentException
Date Fri, 24 Oct 2014 14:31:34 GMT

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

Duncan Jones updated LANG-1056:
-------------------------------
    Description: 
When I try to unescape 

{code:java}
String test = "test &#39511154;";
StringEscapeUtils.unescapeHtml4(test);
{code}

I got :

{noformat}
java.lang.IllegalArgumentException
	at java.lang.Character.toChars(Character.java:4982)
	at org.apache.commons.lang3.text.translate.NumericEntityUnescaper.translate(NumericEntityUnescaper.java:128)
	at org.apache.commons.lang3.text.translate.AggregateTranslator.translate(AggregateTranslator.java:52)
	at org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:85)
	at org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:59)
	at org.apache.commons.lang3.StringEscapeUtils.unescapeHtml4(StringEscapeUtils.java:627)
	at unescapeHtml4Test.Main.main(Main.java:10)
{noformat}

It is bug or not? Method should return "test &#39511154" without exception or not?.

  was:
When i try unescape 
String test = "test &#39511154;";
StringEscapeUtils.unescapeHtml4(test)

I got :
java.lang.IllegalArgumentException
	at java.lang.Character.toChars(Character.java:4982)
	at org.apache.commons.lang3.text.translate.NumericEntityUnescaper.translate(NumericEntityUnescaper.java:128)
	at org.apache.commons.lang3.text.translate.AggregateTranslator.translate(AggregateTranslator.java:52)
	at org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:85)
	at org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:59)
	at org.apache.commons.lang3.StringEscapeUtils.unescapeHtml4(StringEscapeUtils.java:627)
	at unescapeHtml4Test.Main.main(Main.java:10)

It is bug or not ?. Method should return "test &#39511154" without exception or not ?.


> StringEscapeUtils.unescapeHtml4 java.lang.IllegalArgumentException
> ------------------------------------------------------------------
>
>                 Key: LANG-1056
>                 URL: https://issues.apache.org/jira/browse/LANG-1056
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.3.2
>         Environment: Ubuntu 64
>            Reporter: Jakub
>
> When I try to unescape 
> {code:java}
> String test = "test &#39511154;";
> StringEscapeUtils.unescapeHtml4(test);
> {code}
> I got :
> {noformat}
> java.lang.IllegalArgumentException
> 	at java.lang.Character.toChars(Character.java:4982)
> 	at org.apache.commons.lang3.text.translate.NumericEntityUnescaper.translate(NumericEntityUnescaper.java:128)
> 	at org.apache.commons.lang3.text.translate.AggregateTranslator.translate(AggregateTranslator.java:52)
> 	at org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:85)
> 	at org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:59)
> 	at org.apache.commons.lang3.StringEscapeUtils.unescapeHtml4(StringEscapeUtils.java:627)
> 	at unescapeHtml4Test.Main.main(Main.java:10)
> {noformat}
> It is bug or not? Method should return "test &#39511154" without exception or not?.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message