JDK-8224228 : No way to locally suppress lint warnings in parser/tokenizer or preview features
  • Type: Task
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2019-05-20
  • Updated: 2025-08-26
  • Resolved: 2025-08-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b12Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8350212 :  
JDK-8350514 :  
JDK-8354071 :  
JDK-8354090 :  
JDK-8354216 :  
JDK-8359493 :  
Description
Text blocks introduces a lint warning for inconsistent indentation white space. Currently no way to suppress.

Same is true for preview features.
Comments
Changeset: 3e60ab51 Branch: master Author: Archie Cobbs <acobbs@openjdk.org> Date: 2025-08-20 15:04:48 +0000 URL: https://git.openjdk.org/jdk/commit/3e60ab51fea17098d852931a06f4f5a827ae0e78
20-08-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24584 Date: 2025-04-10 20:23:15 +0000
03-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23237 Date: 2025-01-22 16:15:40 +0000
22-01-2025

Since @SuppressWarnings does not get interpreted until attribution, the only way to suppress parser/tokenizer lint warnings such as text-block is from the command line: -Xlint:-text-blocks .
30-08-2023

Does the DeferredLintHandler not help?
13-08-2021