| Summary: | [inline] inline constant removes needed static import | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Brian Miller <Brian.Miller> | ||||
| Component: | UI | Assignee: | Jeff Johnston <jjohnstn> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Jeff Johnston <jjohnstn> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | dma_k, jjohnstn, martinae, pyvesdev | ||||
| Version: | 3.3.1 | ||||||
| Target Milestone: | 4.21 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| See Also: |
https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182194 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=fd3b7a4a3e046735d4b0453ecc6b2fc8cf91e82f |
||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
Created attachment 271501 [details]
Test classes
I confirm the issue for Eclipse 4.7.1. I have attached test scenario (test.7z) which contains class like this:
import static test.Utils.version;
public class Test {
private static final String version = version();
private void test() {
String copy = version;
}
}
After variable "version" is inlined, "import static" statement is gone and class is not compilable anymore:
public class Test {
private void test() {
String copy = version();
}
}
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182194 Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182194 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=fd3b7a4a3e046735d4b0453ecc6b2fc8cf91e82f Released for 4.21 M1 Verified for 4.21 M1 using I20210706-0600 build |
Version: 3.3.1.1 Build id: M20071023-1652 Please see that inlining constant xyz wrongly removes a needed static import. The result is illegal. -------------------- Bug.java ---------------------- import static java.lang.Character.CONTROL; class Bug { static final byte xyz=CONTROL,format=xyz; }