You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2018/07/03 02:38:00 UTC

[jira] [Resolved] (GROOVY-8675) GenericsUtils.PARAMETERIZED_TYPE_CACHE is static and private

     [ https://issues.apache.org/jira/browse/GROOVY-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Sun resolved GROOVY-8675.
--------------------------------
       Resolution: Fixed
         Assignee: Daniel Sun
    Fix Version/s: 2.6.0-alpha-5
                   3.0.0-alpha-4
                   2.5.1

Fixed by https://github.com/apache/groovy/commit/371d8eb1eafbb4be8db21b2597044471d2886426

> GenericsUtils.PARAMETERIZED_TYPE_CACHE is static and private
> ------------------------------------------------------------
>
>                 Key: GROOVY-8675
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8675
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 2.5.1, 3.0.0-alpha-4, 2.6.0-alpha-5
>
>
> Recently, GROOVY-8604, GROOVY-8630, et al. added {{PARAMETERIZED_TYPE_CACHE}} to {{GenericsUtils}}.  This type cache is static and final with no outside interface for clearing it save the soft references.  Long-lived processes (like an IDE) can run into stale class data as the type being compiled are continuously being edited/altered.  And different branches may be brought in from source control.  I don't think it is good practice for the runtime to cache anything in static data structures.
> It's difficult to judge the usefulness of this cache since the linked JIRA tickets and commits do not mention before and after measurements.  But if it is indeed beneficial, could its reference be kept somewhere non-static and passed/accessed by {{GenericsUtils}}?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)