Minor updates #7
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed I made some minor updates that I think should be "safe".
I've updated the dependencies as much as possible while maintaining Java 6 compatibility, and looked at various forks and picked up a couple of things that seem useful. I also ran FindBugs and took care of the most obvious stuff.
I've successfully built it with Java 6, and run tests on a few different files. During testing I tested extracting a 3.5 GB file both from one large archive and several smaller pieces as well as other "random" smaller RAR files I found.
The code style/formatting is very foreign to me, so I have a hard time getting a grasp of what is done some places. I didn't want to reformat everything because the diffs would be huge, but it limits my ability to verify the correctness of the code. FindBugs issues 84 warning as the code is now, but most of it is minor stuff as far as I can see. There are some questionable byte <-> String conversions using the default (JVM) encoding that most definitly can lead to real problems, but correcting that would mean changing the API or investigating the format specs enough to know if only a defined encoding is in use.
The biggest problem I found is that the RAR 5.0 archive format isn't supported at all. That means that RAR archives made with more recent versions of RAR won't be extractable. While I found an up to date C++ source code, I'm not up for such a big task.
It's still useful for the "RAR 4 format" though, and I suppose there are no reason to use the proprietary RAR format for newer archives when free/open alternatives exists.
There's no need to add me as a contributor, I'm not planning to maintain this on a regular basis. My issue is simply that some of the dependencies are so outdated that it creates problems for us when making an "uber JAR" because of dependency collisions with more recent libraries.