Support for JRE/JDK 1.3 by implementation
-----------------------------------------
Key: SANDBOX-175
URL: http://issues.apache.org/jira/browse/SANDBOX-175
Project: Commons Sandbox
Issue Type: Improvement
Components: Compress
Environment: IBM JDK 1.3.1 SR9 for IBM WebSphere Application Server
5.0.2
Reporter: Christian Gosch
Priority: Minor
Currently "commons compress" does not support JDK/JRE 1.3, but requires JDK/JRE
1.4 to compile and run. Since there are still productive environments in real
world which do not support JRE 1.4 or newer (like the mentioned IBM WAS 5.0.2)
and java.util.zip.* has major known bugs in filename handling (see below),
"commons compress" is a reasonable alternative and should be "more compatible".
For problems in handling non-ASCII entry names in java.util.zip.*, see:
http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4244499
http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4820807
For JDK / JRE 1.3 compatibility, only a few things must be fixed:
(1) Set compiler version compatibility version to 1.3 instead of 1.4. This will
result in class files with version identifier "47.0" instead of "48.0". This
may be IDE specific in some cases anyway.
(2) Remove "this.initCause(e);" in some non-default Exception constructors (or
leave them completely blank)
(3) Replace use of "String.split(String)" by JDK 1.3 API in
PackableObject.identifyByHeader(File, List). Here is how it looks like:
String name = file.getName();
String extension = null;
// String[] s = name.split("\\.");
// if(s.length > 1) {
// extension = s[ s.length - 1];
// }
// code above is not JDK 1.3 compliant but requires JDK
1.4.
// Here is the 1.3 compliant implementation:
int i = name.lastIndexOf(".");
if (i > -1) {
extension = name.substring(i + 1);
}
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]