[jdk19] RFR: 8289486: Improve XSLT XPath operators count efficiency

Naoto Sato naoto at openjdk.org
Fri Jul 1 22:31:43 UTC 2022


On Fri, 1 Jul 2022 17:04:10 GMT, Joe Wang <joehw at openjdk.org> wrote:

> To improve efficiency, this patch moves the limit check to within the Lexer and reports any overlimit situation as soon as it happens.
> 
> Note the change in XPathParser: diff (and also webrevs) showed the whole error-report block was changed, the actual change was only placing the block to within the isOverLimit statement.
> 
> Test: java.xml tests passed.

Hi Joe,
In the bug report, it reads:

It would be more efficient for the XSLT XPath impl to do the same as the XPath impl does and report any error earlier

So now the code works as once the first error was found, it immediately reports it. Would that result in a behavioral change, if there are multiple overflows co-exist? Would there be a possibility where a different error be thrown compared to the prior implementation?

-------------

PR: https://git.openjdk.org/jdk19/pull/101


More information about the core-libs-dev mailing list