RFR: JDK-8238646 Cleanup signature and use of CommentHelper
    Jonathan Gibbons 
    jonathan.gibbons at oracle.com
       
    Mon Feb 10 17:35:11 UTC 2020
    
    
  
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
    
    
More information about the javadoc-dev
mailing list