JDK-8289845 : ☂ Remove unused imports
  • Type: Task
  • Component: javafx
  • Sub-Component: other
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2022-07-06
  • Updated: 2024-04-03
  • Resolved: 2024-04-03
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Relates :  
Relates :  
Description
Eclipse Version: 2022-06 (4.24.0) compiler seems to report more programming problems than javac.

As of 2024/03/21, the master branch generates 744 "import is never used" warnings.

See the discussion in JDK-8289379

PROBLEM:
The code in graphics/build/gensrc/jsl-decora/ is generated and cannot be easily fixed - the template for imports seems to be in JSWGlue.stg and by the looks of it this file is being used for all the generated code.
This means this warning **must be suppressed** in IDEs until the generator script is changed not to emit unused imports.

Q: should we enable this warning in the gradle build once all imports are fixed?
Comments
> Q: should we enable this warning in the gradle build once all imports are fixed? I doubt that this would this would be terribly useful. But it can be discussed as part of JDK-8327170 presuming there is even a lint warning that checks this.
21-03-2024