You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Jonathan Lu (JIRA)" <ji...@apache.org> on 2010/10/08 04:59:30 UTC
[jira] Created: (HARMONY-6669) java.util.jar.InitManifest throws
IndexOutOfBoundException when reading special Manifest file
java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
---------------------------------------------------------------------------------------------
Key: HARMONY-6669
URL: https://issues.apache.org/jira/browse/HARMONY-6669
Project: Harmony
Issue Type: Bug
Components: Classlib
Environment: WinXP SP3 x86
Reporter: Jonathan Lu
java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from Harmony's archive.jar/MANIFEST.MF.
File file = new File("MANIFEST.MF");
try {
FileInputStream fis = new FileInputStream(file);
Manifest manifest = new Manifest(fis);
The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
Full stack trace:
java.lang.IndexOutOfBoundsException
at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
at java.util.jar.InitManifest.decode(InitManifest.java:214)
at java.util.jar.InitManifest.readValue(InitManifest.java:171)
at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
at java.util.jar.InitManifest.<init>(InitManifest.java:55)
at java.util.jar.Manifest.read(Manifest.java:231)
at java.util.jar.Manifest.<init>(Manifest.java:95)
at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
at java.lang.reflect.Method.invokeImpl(Native Method)
at java.lang.reflect.Method.invoke(Method.java:228)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Jonathan Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920419#action_12920419 ]
Jonathan Lu commented on HARMONY-6669:
--------------------------------------
Verified.
Thanks Tim.
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Fix For: 5.0M16
>
> Attachments: InitManifest.diff, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison reassigned HARMONY-6669:
------------------------------------
Assignee: Tim Ellison
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Attachments: InitManifest.patch, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Jonathan Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Lu updated HARMONY-6669:
---------------------------------
Description:
java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
File file = new File("MANIFEST.MF");
try {
FileInputStream fis = new FileInputStream(file);
Manifest manifest = new Manifest(fis);
The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
Full stack trace:
java.lang.IndexOutOfBoundsException
at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
at java.util.jar.InitManifest.decode(InitManifest.java:214)
at java.util.jar.InitManifest.readValue(InitManifest.java:171)
at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
at java.util.jar.InitManifest.<init>(InitManifest.java:55)
at java.util.jar.Manifest.read(Manifest.java:231)
at java.util.jar.Manifest.<init>(Manifest.java:95)
at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
at java.lang.reflect.Method.invokeImpl(Native Method)
at java.lang.reflect.Method.invoke(Method.java:228)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
was:
java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from Harmony's archive.jar/MANIFEST.MF.
File file = new File("MANIFEST.MF");
try {
FileInputStream fis = new FileInputStream(file);
Manifest manifest = new Manifest(fis);
The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
Full stack trace:
java.lang.IndexOutOfBoundsException
at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
at java.util.jar.InitManifest.decode(InitManifest.java:214)
at java.util.jar.InitManifest.readValue(InitManifest.java:171)
at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
at java.util.jar.InitManifest.<init>(InitManifest.java:55)
at java.util.jar.Manifest.read(Manifest.java:231)
at java.util.jar.Manifest.<init>(Manifest.java:95)
at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
at java.lang.reflect.Method.invokeImpl(Native Method)
at java.lang.reflect.Method.invoke(Method.java:228)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Summary: [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file (was: java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file)
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Attachments: InitManifest.patch, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-6669.
----------------------------------
Resolution: Fixed
Fix Version/s: 5.0M16
Thanks Jonathan.
The new fix looks good, and I applied it to the ARCHIVE module together with a regression test at r1021745.
Please verify it works as you expected.
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Fix For: 5.0M16
>
> Attachments: InitManifest.diff, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Jonathan Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Lu updated HARMONY-6669:
---------------------------------
Attachment: (was: InitManifest.patch)
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Attachments: MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Jonathan Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Lu updated HARMONY-6669:
---------------------------------
Attachment: InitManifest.diff
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Attachments: InitManifest.diff, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Jonathan Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919312#action_12919312 ]
Jonathan Lu commented on HARMONY-6669:
--------------------------------------
Hi Tim. I agree with you and the patch has been updated. Now the readValue() method should set the mark and pos correctly.
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Attachments: InitManifest.diff, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920178#action_12920178 ]
Hudson commented on HARMONY-6669:
---------------------------------
Integrated in Harmony-select-1.5-head-linux-x86_64 #138 (See [https://hudson.apache.org/hudson/job/Harmony-select-1.5-head-linux-x86_64/138/])
Fix for HARMONY-6669 ([classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file)
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Fix For: 5.0M16
>
> Attachments: InitManifest.diff, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919250#action_12919250 ]
Tim Ellison commented on HARMONY-6669:
--------------------------------------
Hi Jonathan. Thanks for the issue. I agree it should parse the manifest correctly here, but I disagree with the proposed patch. it is masking incorrect values being passed in, and it seems that the correct fix is to ensure readValue() sets the mark and position correctly.
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Attachments: InitManifest.patch, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920170#action_12920170 ]
Hudson commented on HARMONY-6669:
---------------------------------
Integrated in Harmony-1.5-head-linux-x86_64 #985 (See [https://hudson.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/985/])
Fix for HARMONY-6669 ([classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file)
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Fix For: 5.0M16
>
> Attachments: InitManifest.diff, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6669) java.util.jar.InitManifest throws
IndexOutOfBoundException when reading special Manifest file
Posted by "Jonathan Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Lu updated HARMONY-6669:
---------------------------------
Attachment: InitManifest.patch
MANIFEST.MF
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Attachments: InitManifest.patch, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from Harmony's archive.jar/MANIFEST.MF.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-6669) [classlib][archive]
java.util.jar.InitManifest throws IndexOutOfBoundException when reading
special Manifest file
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison closed HARMONY-6669.
--------------------------------
> [classlib][archive] java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6669
> URL: https://issues.apache.org/jira/browse/HARMONY-6669
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP SP3 x86
> Reporter: Jonathan Lu
> Assignee: Tim Ellison
> Fix For: 5.0M16
>
> Attachments: InitManifest.diff, MANIFEST.MF
>
>
> java.util.jar.InitManifest throws IndexOutOfBoundException when reading special Manifest file while RI will work fine.
> This bug can be recreated with the following simple test case and the attached MANIFEST.MF which is created based on the manifest file from archive.jar of Harmony.
> File file = new File("MANIFEST.MF");
> try {
> FileInputStream fis = new FileInputStream(file);
> Manifest manifest = new Manifest(fis);
> The root cause is one space character (' ') occurs in front of the line break characters (\r,\n) at the last line of the manifest file.
> Full stack trace:
> java.lang.IndexOutOfBoundsException
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:106)
> at java.util.jar.InitManifest.decode(InitManifest.java:214)
> at java.util.jar.InitManifest.readValue(InitManifest.java:171)
> at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> at java.util.jar.InitManifest.<init>(InitManifest.java:55)
> at java.util.jar.Manifest.read(Manifest.java:231)
> at java.util.jar.Manifest.<init>(Manifest.java:95)
> at InitManifestTest.test_StandAloneManifest(InitManifestTest.java:23)
> at java.lang.reflect.Method.invokeImpl(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:228)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.