DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37548>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37548





------- Additional Comments From [EMAIL PROTECTED]  2005-11-17 19:23 -------
For example these lines:

*Name: org/bouncycastle/jce/provider/JCERSACipher$SHA512OAEPPadding.cla*
* ss*
*SHA1-Digest: mqoIoBS35xqt/Pd6T9ZXd54jxCg=*

become:

*Name: org/bouncycastle/jce/provider/JCERSACipher$SHA512OAEPPadding.class*
*SHA1-Digest: mqoIoBS35xqt/Pd6T9ZXd54jxCg=*

(I added stars for line start and line end in case they are not preserved)

Manifest file can't have lines longer than 72 bytes by specification.

org.apache.tools.ant.taskdefs.Manifest.Attribute method checks for 72 bytes 
limit but on strings without cr lf. In situations when line is 71 or 72 
characters (without cr lf) long, resulting line will be 73 or 74 bytes long 
respecteivly.

I changed this method and it now works for me, but I am not sure if it works 
for all situations. This is source code of method when I changed it. Line with 
stars is changed. (I am not familiar with diff and that is why I didn't use it)


        private void writeValue(PrintWriter writer, String value)
             throws IOException {

            String line = name + ": " + value;

****        while (line.getBytes("UTF-8").length > MAX_SECTION_LENGTH) {
                // try to find a MAX_LINE_LENGTH byte section
                int breakIndex = line.length() > MAX_SECTION_LENGTH ?
                                        MAX_SECTION_LENGTH : line.length();
                String section = line.substring(0, breakIndex);
                while (section.getBytes("UTF-8").length > MAX_SECTION_LENGTH
                     && breakIndex > 0) {
                    breakIndex--;
                    section = line.substring(0, breakIndex);
                }
                if (breakIndex == 0) {
                    throw new IOException("Unable to write manifest line "
                        + name + ": " + value);
                }
                writer.print(section + EOL);
                line = " " + line.substring(breakIndex);
            }
            writer.print(line + EOL);
        }
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to