| Summary: | ImportRemover.PROPERTY_KEY should be guaranteed to be unique | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Fabian Pfaff <fabian.pfaff> |
| Component: | UI | Assignee: | Fabian Pfaff <fabian.pfaff> |
| Status: | VERIFIED FIXED | QA Contact: | Jeff Johnston <jjohnstn> |
| Severity: | normal | ||
| Priority: | P3 | CC: | jarthana, jjohnstn, kalyan_prasad, Lars.Vogel, loskutov |
| Version: | 4.11 | ||
| Target Milestone: | 4.23 M1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=542653 https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/183145 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=e56e75c944f48b7ec8f283c0b6b31c611df16692 |
||
| Whiteboard: | |||
|
Description
Fabian Pfaff
@Fabian, can you provide a Gerrit fix? 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/+/183145 This might be a naive question - do you think System.nanoTime() would address this issue? And moving to jdt.ui as the code in question belongs there. (In reply to Jay Arthanareeswaran from comment #4) > This might be a naive question - do you think System.nanoTime() would > address this issue? Nanotime doesn't guarantee it grows, although theoretically it is less probably to get collisions. If you need unique numbers, counter could be an option? (In reply to Andrey Loskutov from comment #5) > Nanotime doesn't guarantee it grows, although theoretically it is less > probably to get collisions. If you need unique numbers, counter could be an > option? Good idea! +1 for a counter (In reply to Jay Arthanareeswaran from comment #6) > (In reply to Andrey Loskutov from comment #5) > > Nanotime doesn't guarantee it grows, although theoretically it is less > > probably to get collisions. If you need unique numbers, counter could be an > > option? > > Good idea! +1 for a counter Thank you for your input! I thought along the same lines as well. Please check out https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/183145 where I proposed a solution using a counter, although we're currently not sure if it meets all the requirements. (Does it need to be thread-safe? Is the property key ever written to storage?) Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/183145 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=e56e75c944f48b7ec8f283c0b6b31c611df16692 Released for 4.23 M1 Verified for 4.23 M3 using I20220216 build |