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

The @Singleton transform should complain if other constructors are found

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.1
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: