On 7/1/2013 12:54 PM, Alan Bateman wrote:
On 01/07/2013 19:33, huizhe wang wrote:
:
I've updated the jaxp 1.5 tests. I'll send a separate link since it's
internal. Indeed, I missed a couple of scenarios: 1) FSP can be set
after jaxp 1.5 properties are set through the API; 2) Validator does
not require, but does support FSP.
Given the number of parsers involved, the various ways to set
properties, the FSP hammer, security manager, ... then it's really
important that there is a good set of tests that exercise all the
combinations. So I encourage you to put in as much effort as it
required to get a good set of tests. It would be great to get them
into OpenJDK too, if that is possible.
Daniel has helped adding many tests. The 1st one of the two scenarios
above are tested. It appeared that the properties set through the
factory or parser are always taken into account the last, therefore take
preference in consistence with the spec. We still have the 2nd scenario
to test. But here's the latest webrev:
http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
It also uses the SourceVersion Joe suggested to determine the version of
the JDK.
-Joe
I think isJDKandAbove has the assume the long standing format for
java.version. If someone really did change the format to what you
are suggesting then the code would fail with a value such as "7.40".
The code does support both the current and possible new format by
comparing the 0 element, e.g. Integer.parseInt(versions[0]) >=
compareTo. But I see Joe's comment provided a better way to handle
this.
Okay, I'll wait for the second webrev to see how this looks.
-Alan.