uschindler commented on PR #14633:
URL: https://github.com/apache/lucene/pull/14633#issuecomment-2866618642

   The reason for that problem is in the JLS: 
https://docs.oracle.com/javase/specs/jls/se24/html/jls-11.html#jls-11.2.2
   
   > A throw statement whose thrown expression is a final or effectively final 
exception parameter of a catch clause C can throw an exception class E iff:
   > 
   > * E is an exception class that the try block of the try statement which 
declares C can throw; and
   > * E is assignment compatible with any of C's catchable exception classes; 
and
   > 
   > * E is not assignment compatible with any of the catchable exception 
classes of the catch clauses declared to the left of C in the same try 
statement.
   
   The problem is: When it passes the method it is no longer final/effectivly 
final. The method could change the type of exception.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to