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: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2019-05-20
  • Updated: 2023-08-30
Related Reports
Relates :  
Relates :  
Description
Text blocks introduces a lint warning for inconsistent indentation white space. Currently no way to suppress.

Same is true for preview features.
Comments
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