You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Norbert Reilly (JIRA)" <ji...@apache.org> on 2006/05/31 07:06:29 UTC
[jira] Created: (LANG-260) StringEscapeUtils should expose
escape*() methods taking Writer argument
StringEscapeUtils should expose escape*() methods taking Writer argument
------------------------------------------------------------------------
Key: LANG-260
URL: http://issues.apache.org/jira/browse/LANG-260
Project: Commons Lang
Type: Improvement
Environment: N/A
Reporter: Norbert Reilly
StringEscapeUtils.escapeXML(String) is the only exposed variant, but the package private Entities.XML class it uses under the covers has a variant taking a Writer. The StringEscapeUtils.escapeXML(Writer, String) variant would be much more efficient when incrementally escaping values and adding them one-by-one and could seemingly be exposed with very little effort. Ditto for the unescapeXML() case, and presumably other styles of escape/unescape (like HTML) that use the Entities class under the covers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Resolved: (LANG-260) StringEscapeUtils should expose
escape*() methods taking Writer argument
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/LANG-260?page=all ]
Henri Yandell resolved LANG-260:
--------------------------------
Resolution: Fixed
svn ci -m "Exposing the unescapeXml and escapeXml methods that take Writers - LANG-260. A recent thread
did point out that there are problems with the concept of escaping Xml as a single method, and instead it needs to be an xml parser that escapes the body an
d the attribute content differently - however we're obviously not there yet and I don't think making the existing 80/20 good enough code more usable hurts.
" src/java/org/apache/commons/lang/StringEscapeUtils.java src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
Sending src/java/org/apache/commons/lang/StringEscapeUtils.java
Sending src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
Transmitting file data ..
Committed revision 412009.
> StringEscapeUtils should expose escape*() methods taking Writer argument
> ------------------------------------------------------------------------
>
> Key: LANG-260
> URL: http://issues.apache.org/jira/browse/LANG-260
> Project: Commons Lang
> Type: Improvement
> Environment: N/A
> Reporter: Norbert Reilly
> Fix For: 2.2
>
> StringEscapeUtils.escapeXML(String) is the only exposed variant, but the package private Entities.XML class it uses under the covers has a variant taking a Writer. The StringEscapeUtils.escapeXML(Writer, String) variant would be much more efficient when incrementally escaping values and adding them one-by-one and could seemingly be exposed with very little effort. Ditto for the unescapeXML() case, and presumably other styles of escape/unescape (like HTML) that use the Entities class under the covers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (LANG-260) StringEscapeUtils should expose
escape*() methods taking Writer argument
Posted by "Holger Hoffstätte (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469387 ]
Holger Hoffstätte commented on LANG-260:
----------------------------------------
StringWriter is just a glorified StringBuffer and has exactly no performance advantage to a correctly presized StringBuffer. I think the refactoring done for this has undone what I just commented on in LANG-287.
> StringEscapeUtils should expose escape*() methods taking Writer argument
> ------------------------------------------------------------------------
>
> Key: LANG-260
> URL: https://issues.apache.org/jira/browse/LANG-260
> Project: Commons Lang
> Issue Type: Improvement
> Environment: N/A
> Reporter: Norval Hope
> Fix For: 2.2
>
>
> StringEscapeUtils.escapeXML(String) is the only exposed variant, but the package private Entities.XML class it uses under the covers has a variant taking a Writer. The StringEscapeUtils.escapeXML(Writer, String) variant would be much more efficient when incrementally escaping values and adding them one-by-one and could seemingly be exposed with very little effort. Ditto for the unescapeXML() case, and presumably other styles of escape/unescape (like HTML) that use the Entities class under the covers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (LANG-260) StringEscapeUtils should expose
escape*() methods taking Writer argument
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469483 ]
Henri Yandell commented on LANG-260:
------------------------------------
This went in 2.2, however LANG-287 is going in 2.3 - and if you check the revision numbers you'll see that this revision number is much lower than the other. Not to say LANG-287 hasn't been undone, but it wasn't this issue that did it as this was resolved before LANG-287 was even created.
> StringEscapeUtils should expose escape*() methods taking Writer argument
> ------------------------------------------------------------------------
>
> Key: LANG-260
> URL: https://issues.apache.org/jira/browse/LANG-260
> Project: Commons Lang
> Issue Type: Improvement
> Environment: N/A
> Reporter: Norval Hope
> Fix For: 2.2
>
>
> StringEscapeUtils.escapeXML(String) is the only exposed variant, but the package private Entities.XML class it uses under the covers has a variant taking a Writer. The StringEscapeUtils.escapeXML(Writer, String) variant would be much more efficient when incrementally escaping values and adding them one-by-one and could seemingly be exposed with very little effort. Ditto for the unescapeXML() case, and presumably other styles of escape/unescape (like HTML) that use the Entities class under the covers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (LANG-260) StringEscapeUtils should expose
escape*() methods taking Writer argument
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/LANG-260?page=all ]
Henri Yandell updated LANG-260:
-------------------------------
Fix Version: 2.2
Consider for 2.2. Haven't looked at the source in question for a few weeks, but it sounds fine at first glance.
> StringEscapeUtils should expose escape*() methods taking Writer argument
> ------------------------------------------------------------------------
>
> Key: LANG-260
> URL: http://issues.apache.org/jira/browse/LANG-260
> Project: Commons Lang
> Type: Improvement
> Environment: N/A
> Reporter: Norbert Reilly
> Fix For: 2.2
>
> StringEscapeUtils.escapeXML(String) is the only exposed variant, but the package private Entities.XML class it uses under the covers has a variant taking a Writer. The StringEscapeUtils.escapeXML(Writer, String) variant would be much more efficient when incrementally escaping values and adding them one-by-one and could seemingly be exposed with very little effort. Ditto for the unescapeXML() case, and presumably other styles of escape/unescape (like HTML) that use the Entities class under the covers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org