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

ClassNode.equals throws ClassCastException for object of other type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8.1, 1.7.11
    • None
    • None
    • groovy 1.7.8

    Description

      ClassNode.equals(Object o) should check for different types and return false. Current Code:

       public boolean equals(Object o) {
              if (redirect!=null) return redirect().equals(o);
              ClassNode cn = (ClassNode) o;
              return (cn.getName().equals(getName()));
          }
      

      is obviously wrong.

      Attachments

        Activity

          People

            paulk Paul King
            johanneslink Johannes Link
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: