slawekjaranowski commented on code in PR #173:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/173#discussion_r1093728057


##########
src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java:
##########
@@ -107,71 +123,17 @@ public boolean equals( Object obj )
         {
             return true;
         }
-        if ( obj == null )
-        {
-            return false;
-        }
-        if ( getClass() != obj.getClass() )
+        if ( obj == null || getClass() != obj.getClass() )
         {
             return false;
         }
         DependencyCoordinate other = (DependencyCoordinate) obj;
-        if ( artifactId == null )
-        {
-            if ( other.artifactId != null )
-            {
-                return false;
-            }
-        }
-        else if ( !artifactId.equals( other.artifactId ) )
-        {
-            return false;
-        }
-        if ( classifier == null )
-        {
-            if ( other.classifier != null )
-            {
-                return false;
-            }
-        }
-        else if ( !classifier.equals( other.classifier ) )
-        {
-            return false;
-        }
-        if ( groupId == null )
-        {
-            if ( other.groupId != null )
-            {
-                return false;
-            }
-        }
-        else if ( !groupId.equals( other.groupId ) )
-        {
-            return false;
-        }
-        if ( type == null )
-        {
-            if ( other.type != null )
-            {
-                return false;
-            }
-        }
-        else if ( !type.equals( other.type ) )
-        {
-            return false;
-        }
-        if ( version == null )
-        {
-            if ( other.version != null )
-            {
-                return false;
-            }
-        }
-        else if ( !version.equals( other.version ) )
-        {
-            return false;
-        }
-        return true;

Review Comment:
   😄 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to