On 2/10/20 4:21 AM, Pavel Rappo wrote:
Yeah, the code (not the patch) still leaves me with a feeling of unease. It's as
if the objects look around for whatever convenient neighboring objects to ad-hoc
provide the required configuration. It should be refactored, though not in this
patch.


After sorting out the other related change to rename WeakSoftHashMap to CommentHelperCache, it became clearer that there are a couple of maps that map Element to a DocCommentTree and related info, although different target types in each case: something like DocCommentDuo in one case and CommentHelper in another.

I think we ought to be able to merge these into something more like a single map of Map<Element,DocInfo> for some new class DocInfo that merges the relevant functionality of DocCommentDuo and CommentHelper.  But this is a more potentially more risky change than the recent round of refactorings to cleanup and simplify the code,  and, as you said, not in this patch.

--

I may tweak the patch the avoid caching utils in each object.

-- Jon

Reply via email to