harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5517) [classlib][archive] simplifying archive code by fixing manifest encoding to UTF-8
Date Thu, 13 Mar 2008 14:41:47 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578312#action_12578312
] 

Alexei Fedotov commented on HARMONY-5517:
-----------------------------------------

Tim, I'm sorry. I'm new to the class library conventions, and asking questions to understand
these conventions better.

You changed 
  -        byte[] out = (name.toString() + ": ").getBytes("ISO8859_1"); //$NON-NLS-1$ //$NON-NLS-2$
to
  +        byte[] out = (name.toString() + ": ").getBytes("UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$

instead of  using my

  +        byte[] out = (name.toString() + ": ").getBytes(ENCODING); //$NON-NLS-1$

What is the reason behind using "UTF-8" string instead of a final variable? 
    static final String ENCODING = "UTF-8"; //$NON-NLS-1$

I though using constants is a sort of cleaner.


> [classlib][archive] simplifying archive code by fixing manifest encoding to UTF-8
> ---------------------------------------------------------------------------------
>
>                 Key: HARMONY-5517
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5517
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Alexei Fedotov
>            Assignee: Tim Ellison
>             Fix For: 5.0M6
>
>         Attachments: remove_manifest_encoding.patch, remove_manifest_encoding_2.patch,
remove_manifest_encoding_3.patch
>
>
> By specification [1] manifests are encoded in UTF-8. There is no need to make code more
complex than that, so legacy of HARMONY-14 may be removed. Testing the patch.
> [1] http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message