On Tue, 22 Sep 2026 09:48:45 GMT, Jaikiran Pai <[email protected]> wrote:

> Can I please get a review of this trivial change which proposes to prevent 
> the deprecation warning from `SourcePositions.getStartPosition()` usage?
> 
> JDK 27, through https://bugs.openjdk.org/browse/JDK-8380147, deprecated the 
> `SourcePositions.getStartPosition(CompilationUnitTree file, Tree tree)` API. 
> The deprecation note suggests using `SourcePositions.getStartPosition(Tree 
> tree)`, which is what this commit does.
> 
> I've verified locally that with this change the deprecation warning is no 
> longer emitted and the build continues to complete normally.
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

I'm going to put this PR in draft mode because the new API being used here is 
available only starting Java 27 (and I realized that only after opening the 
PR). Once we officially upgrade the JDK build to use JDK 27 as the boot JDK, 
then we can use the fix from this PR to prevent the deprecation warning.

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

PR Comment: https://git.openjdk.org/jdk/pull/33002#issuecomment-5774781627

Reply via email to