-
Notifications
You must be signed in to change notification settings - Fork 52
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
DefaultModuleService: change persisting of items #236
base: master
Are you sure you want to change the base?
Conversation
Did this work well in your tests? |
It works as I expect it to work after resetting the Prefs. That leaves us with two issues:
I couldn't find any other odd behavior. But as you have already mentioned, we might be breaking someone else's code with this change. |
I have added clarifying documentation in |
34b1672
to
e1296fb
Compare
@@ -34,8 +34,12 @@ | |||
import static org.junit.Assert.assertNull; | |||
import static org.junit.Assert.assertSame; | |||
|
|||
import java.security.GeneralSecurityException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
Thanks for the comments (and being so patient), @ctrueden! They have been addressed. |
I gave this a little more thought, and here is what I would like to do:
I would like to include this update as part of the SJC3 release, due within the next few months. There is an If you have time to tackle it, great. Or if not, I will take care of it before SJC3 is released. |
b0fe402
to
c9992de
Compare
Disable the persisting of a ModuleItems if an initialize() method is set and is not empty. This way, initialize() can overwrite the value of a ModuleItem even if persist=true is assumed implicitly. See: * imagej/imagej-legacy#137 (comment)
Introduces the ItemPersistence enum (YES, NO, DEFAULT). YES and NO overwrite additional checks (i.e. precedence of an initializer, value is default value). In case of DEFAULT, the value is persisted only if it is not the default value and no initializer is set.
0c50673
to
b4e8a32
Compare
I did, @ctrueden. But that invalidates all |
FYI, my plan is to merge this into the |
Just a quick update: I looked into doing this earlier in January, but the So it will be a while longer before I have time to get all this unified. Probably April. I am anxious to get SJC3 finished and merged, but it's going to be a substantial endeavor. The good news is that I won't forget about this PR, thanks to its inclusion in the |
53b6733
to
3dc99c9
Compare
Disable the persisting of a
ModuleItem
s if aninitialize()
method is set and is not empty. This way,initialize()
can overwrite the value of aModuleItem
even ifpersist=true
is assumed implicitly.See: