getIntroducedTypePatterns
The following rule applies to a statement do S while (e): - A pattern variable is introduced by do S while (e) iff (i) it is introduced by e when false and (ii) S does not contain a reachable break statement for which the do statement is the break target. https://docs.oracle.com/javase/specs/jls/se21/html/jls-6.html#jls-6.3.2.4