-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use more general Map interface for setOptions() #3610
base: master
Are you sure you want to change the base?
Conversation
|
@carstenartur is this what you want? |
Basically, yes - something like this. The code itself still is creating copies of maps in some situations that popped up as performance hotspot back when I investigated using the sap hana tools on Eclipse years ago. I barely remember any details and don't have the time to investigate again right now. And imho you are a better java and Eclipse developer than me anyway ;) What might be helpful is to put the recipe to reproduce an issue with multithreading and options into a junit test: |
There are callers like org.eclipse.jdt.core.ICompilationUnit.getOptions(boolean) which would try to modify the returned map, so one has to be careful in refactoring to use a unmodifiable map. |
and log any error getUnmodifiableOptions() avoids to copy the cached options on each call
And avoid some "rawtypes", "unchecked"
and log any error