Community
Participate
Working Groups
When a ServiceComponent is loaded using readObject(), the configurationPolicy is set using in.readUTF(). Later in the Resolver, the configurationPolicy is compared against the constants CONF_POLICY_* using == and != which fails because the strings are not the same object.
Created attachment 135489 [details] proposed patch
Good catch! The patch looks good. I Will release it soon.
Created attachment 135534 [details] optimized patch Optimized patch based on the previous one.
Stoyan, please see the end-game for 3.5 (http://www.eclipse.org/equinox/planning/freeze_plan_3.5.php). As we enter RC builds we must have additional reviews of fixes. For RC1 fixes you must get another committer to review the patch. Let me know when you have a patch to release, I can review. Use the review flag (?) with my e-mail to ask for a review. Thanks.
I do not agree with the optimized patch. If the configuration policy is set to optional, the optimized patch will override that setting and set it to require.
(In reply to comment #5) > I do not agree with the optimized patch. If the configuration policy is set to > optional, the optimized patch will override that setting and set it to require. > In writeObject method the flag is not written out and the default setting is set to CONF_POLICY_OPTIONAL. You should never read in a "optional" string.
Comment on attachment 135489 [details] proposed patch Flag for IP log.
I still respectively disagree. It doesn't matter the value read. If the value read does not equal ignore, the config policy gets set to require.
(In reply to comment #8) > I still respectively disagree. It doesn't matter the value read. If the value > read does not equal ignore, the config policy gets set to require. Have a look at the writeObject method implementation. If your configuration policy is CONF_POLICY_OPTIONAL, then only one boolean flag is written in the stream having value false. Then in readObject if the read boolean flag has value "false" then the code reading the configurationPolicy value as string does not get executed. In this case the configurationPolicy field stays with the default value CONF_POLICY_OPTIONAL.
Ah, now it makes sense. I agree with the optimized patch. Thanks for clarifying.
Patch released