You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alex Blewitt (JIRA)" <ji...@apache.org> on 2006/11/21 01:29:02 UTC

[jira] Created: (HARMONY-2246) [classlib][pack200] Ongoing implementation

[classlib][pack200] Ongoing implementation
------------------------------------------

                 Key: HARMONY-2246
                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
             Project: Harmony
          Issue Type: New Feature
          Components: Classlib
            Reporter: Alex Blewitt
            Priority: Trivial


The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.

This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2246?page=all ]

Alexey Petrenko resolved HARMONY-2246.
--------------------------------------

    Resolution: Fixed

The test case commented out.

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch, pack200.tgz, pack200.tgz
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2246?page=comments#action_12452084 ] 
            
Alex Blewitt commented on HARMONY-2246:
---------------------------------------

I'm not convinced that the patch that's being generated out of subclipse (or subversion, for that matter) is really that useful. I moved some classes from the pack200 package into pack200.bytecode (which might be why it was claiming to update non-modified files).  It doesn't seem to keep track of any of the moves of the files, or for that matter, the difference between a newly added file or a changed file.

I've had to attach two separate subdirectories. They've got .svn information with them as well, but the repository was still the old incubator URL. I figured that at least giving the source was a good way of showing what there is now.

The big problem I'm having with generating patches is that it's in the same module as the rest of the archive classes. I can't develop with those in my workspace, since I'm developing on Mac OS X and thus I'm developing against the provided Mac OS X libraries. I've suggested (separately) that the pack200 stuff be moved out to its own module to make it easier to do patches etc. on the code as a whole. Unfortunately, I don't see the subclipse patching mechanism working very well in the future for submitting changes, so I'll probably revert to using both patches and zips in future submissions to avoid this problem.

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch, pack200.tgz, pack200.tgz
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2246?page=comments#action_12455478 ] 
            
Alex Blewitt commented on HARMONY-2246:
---------------------------------------

Thanks for applying. I've been away for a while. The code bands is more likely not an error; but rather, it's now possible for the file to detect when it's got unsupported data (before it was just ignoring it). So it's a case of the test not being correct, rather than the code. I'll look into it, but it's quite possible that the test should be deleted.



> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch, pack200.tgz, pack200.tgz
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2246?page=all ]

Alex Blewitt updated HARMONY-2246:
----------------------------------

    Attachment: pack200.tgz

This is the snapshot of the src/main/java/org/apache/harmony/archive/internal directory

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch, pack200.tgz
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2246?page=all ]

Alexey Petrenko reassigned HARMONY-2246:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2246?page=all ]

Alex Blewitt updated HARMONY-2246:
----------------------------------

    Attachment: harmony200.patch

Provides new functionality in the form of the .bytecode. package and improvements to the segment parsing and writing to take account of ConstantValue and Exception attribute types

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>            Priority: Trivial
>         Attachments: harmony200.patch
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2246?page=comments#action_12455487 ] 
            
Alex Blewitt commented on HARMONY-2246:
---------------------------------------

Thanks, I've gone through this and it looks good. The testHelloWorld can be ignored for now; I've put in a bit more stringent error checking which means that file won't parse any more (before, it was ignoring anything else on the end). Probably the best thing to do is to comment out the test method itself:

public class SegmentTest extends TestCase {
	/**
	 * @param args
	 * @throws Exception
	 */
//	public void testHelloWorld() throws Exception {
//		assertNotNull(Segment.parse(Segment.class
//				.getResourceAsStream("/org/apache/harmony/archive/tests/internal/pack200/HelloWorld.pack")));
//	}

When I implement the next bit (which is parsing the code bands) this error won't be thrown any more. But basically, it's because I've not got as far as decoding the bytecode yet :-)

Do you want me to attach another patch with this, or would you be able to comment out this method for now?

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch, pack200.tgz, pack200.tgz
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2246?page=comments#action_12451895 ] 
            
Alexey Petrenko commented on HARMONY-2246:
------------------------------------------

Absolutely the same situation here. The patch is trying to change missing files...
Probably the simplest way will be to send a source archive.

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2246?page=comments#action_12452494 ] 
            
Alexey Petrenko commented on HARMONY-2246:
------------------------------------------

Alex, I've commited your changes.
But one of the unit test fails on my side and I've excluded it for a while.
SegmentTest.testHelloWorld
Can't handle non-abstract, non-native methods/initialisers at the moment (found 3 code bands)
java.lang.Error: Can't handle non-abstract, non-native methods/initialisers at the moment (found 3 code bands) at org.apache.harmony.archive.internal.pack200.Segment.parseCodeBands(Segment.java:811) at org.apache.harmony.archive.internal.pack200.Segment.parseClassBands(Segment.java:763) at org.apache.harmony.archive.internal.pack200.Segment.parseSegment(Segment.java:1485) at org.apache.harmony.archive.internal.pack200.Segment.parse(Segment.java:149) at org.apache.harmony.archive.tests.internal.pack200.SegmentTest.testHelloWorld(SegmentTest.java:35) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)

Please verify the sources and fix the test.

Thanks in advance.

> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch, pack200.tgz, pack200.tgz
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2246) [classlib][pack200] Ongoing implementation

Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2246?page=all ]

Alex Blewitt updated HARMONY-2246:
----------------------------------

    Attachment: pack200.tgz

This is a zip of the src/test/java/org/apache/harmony/archive/tests/internal package.

Note that although it's got the same name as the attachment in #2, this is for the tests package


> [classlib][pack200] Ongoing implementation
> ------------------------------------------
>
>                 Key: HARMONY-2246
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2246
>             Project: Harmony
>          Issue Type: New Feature
>          Components: Classlib
>            Reporter: Alex Blewitt
>         Assigned To: Alexey Petrenko
>            Priority: Trivial
>         Attachments: harmony200.patch, pack200.tgz, pack200.tgz
>
>
> The pack200 code is now capable of unpacking multiple classes and interfaces, along with primitive (byte/short/char/int/long/float/double) and String constant values. It can only handle abstract/native methods at this stage and no internal classes, but it's a fair bit further on than the last successfully applied patch.
> This patch was generated on the command line against the previous SVN repository from the root of the project (i.e. relative paths). It also includes the newly added files which weren't all correctly added last time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira