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

The extension mechanism do not work when a method named "X" is a added to class having a private method named "X"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.6
    • 5.0.0-alpha-1
    • groovy-runtime
    • None

    Description

      Take in consideration the following example, extend the java.nio.Path interface adding a new method named "isEmpty".

      The extension method signature would be:

      def static boolean isEmpty( Path path ) {
      :
      }

      But the above method is never invoked because the UnixPath which implements the Path interface declares a private method isEmpty() as well.

      Attachments

        Activity

          People

            emilles Eric Milles
            pablo72 paolo di tommaso
            Votes:
            0 Vote for this issue
            Watchers:
            2 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 - 0.5h
                0.5h