On Fri, 1 Jul 2022 17:04:10 GMT, Joe Wang <jo...@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 Naoto, 

Thanks for reviewing.

For counting, it's mainly the way the totalOpCount was accumulated (e.g. 
previously it was totalOpCount += opCount and now totalOpCount++). But since 
the limit on total ops is usually significantly larger than that of the count 
for one expression, this change won't have effect on how it was reported, that 
is, it won't be report before individual limit is reached. In that regard, the 
reporting sequence hasn't changed (that is, group -> individual count -> 
total). 

The other factor is that this feature is fairly new, the change therefore will 
unlikely affect any real-world applications.

The test cases, reporting group/individual/total errors in the order, continued 
passing, that's a good indicator as well.

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

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

Reply via email to