Hi,
In the method mentioned in the subject, we find the following code segment:
Object o = localRegistry.get(key);
if (o == null || o instanceof Entry) {
if (o == null) {
// this is not a local definition
synchronized (this) {
o = localRegistry.get(key);
*if (o == null) { Entry entry = new
Entry(key);
entry.setType(Entry.REMOTE_ENTRY); addEntry(key,
entry); return entry; }*
}
}
return (Entry) o;
} else {
if (log.isDebugEnabled()) {
log.debug("There is no local registry entry for key : " +
key);
}
return null;
}
Considering the code lines shown in bold text, if there is no Entry found
in the local registry for the given key, it creates an Entry with the given
key and null value and adds to the local registry. Rather than doing this,
shouldn't this method be simply returning null if the resource is not
found?This is synapse 2.1.1-wso2v7.
--
Thanks and Regards,
Isuru H.
Software Engineer, WSO2 Inc.
+94 716 358 048* <http://wso2.com/>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev