Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-623

strange looking equals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.6
    • None
    • CSS
    • None
    • Operating System: other
      Platform: All

    Description

      in batik.css.engine.sac.AbstractElementSelector i found an equals-method like this:
      public boolean equals( Object obj ) {
      if ( obj == null || !( obj.getClass() != getClass() ))

      { return false; }

      ... other comparisons ...

      The double negated class-compare doesnt make sense to me. The intention seems to
      be to reject checks against other classes. I 'd do it with instanceof.
      The same code exists in AbstractAttributeCondition, AbstractCombinatorCondition,
      AbstractDescendantSelector, AbstractSiblingSelector, CSSConditionalSelector,
      CSSLangCondition.

      Attachments

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            dvholten Dieter von Holten
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: