You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Evgeniya Maenkova (JIRA)" <ji...@apache.org> on 2008/02/07 18:19:08 UTC
[jira] Created: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
[classlib][archive] Manifest file with empty line proves IOException
--------------------------------------------------------------------
Key: HARMONY-5473
URL: https://issues.apache.org/jira/browse/HARMONY-5473
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Evgeniya Maenkova
Priority: Critical
Attachments: MANIFEST.MF, MANIFEST2.MF
I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
Test case output:
$ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
Uncaught exception in main:
java.io.IOException: Invalid attribute
at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
at java.util.jar.InitManifest.<init>(InitManifest.java:71)
at java.util.jar.Manifest.read(Manifest.java:173)
at java.util.jar.Manifest.<init>(Manifest.java:76)
at Test.main(Test.java:8)
$ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
end
Test case is:
import java.io.FileInputStream;
import java.util.jar.Manifest;
public class Test {
public static void main(String[] args) throws Exception {
String fileName = args[0];
FileInputStream fs = new FileInputStream(fileName);
Manifest m = new Manifest(fs);
fs.close();
System.out.println("end");
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Alexei Fedotov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572569#action_12572569 ]
Alexei Fedotov commented on HARMONY-5473:
-----------------------------------------
Stepan, theoretically your understanding may be correct as well. Personally I prefer to delay all verifications, etc to get a startup speed up. From the other side it looks like we have compatibility tests which show IOException on RI in case of incorrect line breaks (probably because they probably are using BufferedInputStream for reading of line break separated stream). Without a good reason we'd better be compatible.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658300#action_12658300 ]
Nathan Beyer commented on HARMONY-5473:
---------------------------------------
Is this still an issue? Is it still valid?
It seems like we've discussed this, but I can't find the related mail.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Alexei Fedotov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Fedotov resolved HARMONY-5473.
-------------------------------------
Resolution: Fixed
I have rewritten all the related code as a part of HARMONY-4569.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova updated HARMONY-5473:
---------------------------------------
Attachment: archive.patch
patch for archive module
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Priority: Critical
> Attachments: archive.patch, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova reopened HARMONY-5473:
----------------------------------------
Aleksey, I agree. Looks like RI contradicts with specification.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566987#action_12566987 ]
Evgeniya Maenkova commented on HARMONY-5473:
--------------------------------------------
Further investigation show, the first empty line proves this issue.
If an empty line isn't first, Manifest.java handles it fine....
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Priority: Critical
> Attachments: MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko reassigned HARMONY-5473:
----------------------------------------
Assignee: Alexey Petrenko
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Alexei Fedotov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572877#action_12572877 ]
Alexei Fedotov commented on HARMONY-5473:
-----------------------------------------
Manifests with an empty main section are described as violating specification in RI database [1]. Let's revert the patch.
[1] http://bugs.sun.com/view_bug.do?bug_id=4271239
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572472#action_12572472 ]
Stepan Mishura commented on HARMONY-5473:
-----------------------------------------
Aleksei, Evgeniya could you point to where the spec. mandates java.util.jar.Manifest to validate manifest file?
It says:
public Manifest(InputStream is) throws IOException
...
Throws: IOException - if an I/O error has occurred
As I understood it IOException is thrown *ONLY* in case of I/O error.
The spec. doesn't force implementation to throw the exception if manifest file is incorrect.
Thanks,
Stepan.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova updated HARMONY-5473:
---------------------------------------
Attachment: archive.patch
hyts_manifest1.mf
Unit-test patch:
hyts_manifest1.mf to be checked in at trunk\working_classlib\support\src\test\java\tests\resources\manifest\hyts_manifest1.mf
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Alexei Fedotov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572424#action_12572424 ]
Alexei Fedotov commented on HARMONY-5473:
-----------------------------------------
My current assumption is that skipping arbitrary number of lines at the file beginning is not the thing specifications expects. Instead, there might be missing main section which is separated from entries with an empty line.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko resolved HARMONY-5473.
--------------------------------------
Resolution: Fixed
The patch has been applied.
Please verify.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova closed HARMONY-5473.
--------------------------------------
works as expected. Thanks, Aleksey
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stepan Mishura updated HARMONY-5473:
------------------------------------
Comment: was deleted
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567944#action_12567944 ]
Stepan Mishura commented on HARMONY-5473:
-----------------------------------------
Alexey, Evgeniya, the commit r620461 does include a regression test. Is it possible to create it? Could you add it?
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567947#action_12567947 ]
Stepan Mishura commented on HARMONY-5473:
-----------------------------------------
Alexey, Evgeniya, the commit r620461 does not include a regression test. Is it possible to create it? Could you add it?
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Alexei Fedotov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Fedotov closed HARMONY-5473.
-----------------------------------
The code under discussion is no longer in the code base.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Evgeniya Maenkova (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeniya Maenkova updated HARMONY-5473:
---------------------------------------
Attachment: MANIFEST.MF
MANIFEST2.MF
manifest files with empty lines
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Priority: Critical
> Attachments: MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5473) [classlib][archive] Manifest file
with empty line proves IOException
Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570167#action_12570167 ]
Andrey Pavlenko commented on HARMONY-5473:
------------------------------------------
It looks like this fix caused a regression - the test http://people.apache.org/~smishura/r620734/Linux_x86_64/func/junit/functional/org/apache/harmony/test/func/api/java/util/jar/Manifest/package-summary.html failed after the commit. As mentioned in HARMONY-4419, IOEx should be thrown for \n\r character sequence.
> [classlib][archive] Manifest file with empty line proves IOException
> --------------------------------------------------------------------
>
> Key: HARMONY-5473
> URL: https://issues.apache.org/jira/browse/HARMONY-5473
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Evgeniya Maenkova
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: archive.patch, archive.patch, hyts_manifest1.mf, MANIFEST.MF, MANIFEST2.MF
>
>
> I cannot start some of my apps, because their jar-files contain manifests with empty lines, proving IOException on Harmony.
> The situation can be reproduced by manifest file with empty line creation and invoking new Manifest(InputStream). Manifest files which proves this will be attached.
> Test case output:
> $ /cygdrive/c/Harmony_to_run/trunk/working_vm/build/win_ia32_msvc_release/deploy/jdk/jre/bin/java Test MANIFEST2.MF
> Uncaught exception in main:
> java.io.IOException: Invalid attribute
> at java.util.jar.InitManifest.addAttribute(InitManifest.java:282)
> at java.util.jar.InitManifest.<init>(InitManifest.java:71)
> at java.util.jar.Manifest.read(Manifest.java:173)
> at java.util.jar.Manifest.<init>(Manifest.java:76)
> at Test.main(Test.java:8)
> $ /cygdrive/w/UBS/Builds/jdk1.6.0_win32/bin/java Test MANIFEST2.MF
> end
> Test case is:
> import java.io.FileInputStream;
> import java.util.jar.Manifest;
> public class Test {
> public static void main(String[] args) throws Exception {
> String fileName = args[0];
> FileInputStream fs = new FileInputStream(fileName);
> Manifest m = new Manifest(fs);
> fs.close();
> System.out.println("end");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.