Bug 583054 - Eclipse 4.31: static import of StringTemplate STR
Summary: Eclipse 4.31: static import of StringTemplate STR
Status: NEW
Alias: None
Product: Incubator
Classification: Eclipse Project
Component: e4 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: E4 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-20 04:00 EDT by kurt ablinger CLA
Modified: 2024-03-20 04:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kurt ablinger CLA 2024-03-20 04:00:20 EDT
If Organize imports is selected in Save Actions, then a static import is added in source

  import static java.lang.StringTemplate.STR;

when StringTemplate STR is used - for example:

  final String name = "Bob";
  System.out.println(STR."Hi \{name}");

But then the compiler complains about it:

  The import java.lang.StringTemplate.STR is never used