You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Yaniv Kunda (Jira)" <ji...@apache.org> on 2024/01/09 08:50:00 UTC
[jira] [Comment Edited] (IO-337) ByteOrderMark can be refactored as an enum
[ https://issues.apache.org/jira/browse/IO-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17804635#comment-17804635 ]
Yaniv Kunda edited comment on IO-337 at 1/9/24 8:49 AM:
--------------------------------------------------------
Realizing the niceness of this idea diminishes against the current use of this class as an arbitrary byte-sequence header representation in {{XmlStreamReader.}}
{{XML_GUESS_BYTES}} and other similar use cases, I'm retracting this proposal.
was (Author: kunda):
Realizing the niceness of this idea diminishes against the current use of this class as an arbitrary byte-sequence header representation in {{XmlStreamReader.
XML_GUESS_BYTES}} and other similar use cases, I'm retracting this proposal.
> ByteOrderMark can be refactored as an enum
> ------------------------------------------
>
> Key: IO-337
> URL: https://issues.apache.org/jira/browse/IO-337
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Yaniv Kunda
> Priority: Minor
> Attachments: ByteOrderMark-enum.patch
>
>
> ByteOrderMark is used primarily for encapsulating the data regarding to Unicode BOMs. Since those are fixed, it would make sense to make it an enum, instead of a public class.
> I have attached a patch that only covers ByteOrderMark itself, including an additional getCharset() utility method, and toString() simplification.
> This patch does not cover:
> 1) Its incorrect use (per its perceived purpose) in XmlStreamReader.XML_GUESS_BYTES
> 2) The now-unnecessary tests
--
This message was sent by Atlassian Jira
(v8.20.10#820010)