Tibor17 commented on a change in pull request #8:
URL: https://github.com/apache/maven-gpg-plugin/pull/8#discussion_r414106460
##########
File path: src/main/java/org/apache/maven/plugins/gpg/GpgVersion.java
##########
@@ -140,4 +140,26 @@ public String toString()
return rawVersion;
}
+ @Override
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ {
+ return true;
+ }
+
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
+
+ GpgVersion that = (GpgVersion) o;
+ return compareTo( that ) == 0;
Review comment:
Forced pushed the try catch for IllegalArgumentException.
But this `compareTo` does not compare a raw string. I think the equals
should not necessarily compare strings, but the what is represented byt the
object - GPG version.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]