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

@Singleton doesn't support getInstance() as documented

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.1, 1.7-beta-1
    • Component/s: ast builder
    • Labels:
      None

      Description

      e.g.

      @Singleton class MyService{
      }
      
      println MyService.instance // it works as expected
      println MyService.getInstance() //throw exception: No signature of method: static MyService.getInstance() is applicable for argument types: () values: []
      

      p.s. i found an old issue about Singleton in Groovy that probably could be closed GROOVY-1870

        Attachments

        1. 3442_v16x.txt
          2 kB
          Roshan Dawrani

          Activity

            People

            • Assignee:
              roshandawrani Roshan Dawrani
              Reporter:
              mingfai Mingfai Ma
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: