On 1/17/07, Lev Kozakov <[EMAIL PROTECTED]> wrote:
Actually, we need to check both the Java version (java.version) and its vendor (java.vendor), since IBM Java 1.4.x works fine with XML BOM. There is no problem to skip the test, but real PEAR installation may fail, if one of the descriptors contains BOM. The best solution, probably, is removing BOM from XML descriptors when running under Sun's JVM 1.4.x, but this goes far beyond the PEAR installation.
Users can also install the Xerces parser, and then PEAR installation would work. We could document this limitation and workaround.
To make the PEAR installation (and all the tests) work with all Java versions, I propose complete removal of XML validation call (isValidXmlFile) from the 'detectXmlFileEncoding' method. This is the call that leads to failures in Sun's Java 1.4.x with XML files containing BOM.
Hmmm... if we remove the isValidXmlFile call what will happen when the user tries to later run their component? Will it fail to parse the descriptor at that time due to the BOM? In any case, if we think there's value in this validation I'm reluctant to completely remove it just to support an older JRE. -Adam
