commons-issues mailing list archives

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

             Summary: 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 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 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