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

The @Singleton transform should complain if other constructors are found

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.1
    • None
    • None

    Description

      The @Singleton transform creates a private no-arg constructor (and in fact provides an implementation which throws an exception) but it doesn't complain if other constructors are already present. Other constructors would allow the Singleton pattern to be violated and so should result in a compile-time error.

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: