Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9416

Avoid unnecessary looking up non default import classes when resolving types

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      The fix for GROOVY-9408 has warmed up the cache of ResolveVisitor, thus the cache contains all classes from the default imported packages, so it is not necessary to look up non default imported classes against each defaut imported packages. For example,

      In the following code, we do not need to look up java.lang.Foo, java.util.Foo, ..., groovy.util.Foo

      Foo foo = new Foo() // Foo is not a default imported classes
      

      Some test classes are defined under package groovy.lang and groovy.util, e.g. groovy.util.Person, groovy.lang.DummyGStringBase, they are not real Groovy core classes and should not be declared in the two packages, so the fake classes will not be imported be default.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            daniel_sun Daniel Sun
            daniel_sun Daniel Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h
                4h

                Slack

                  Issue deployment