Skip to content

Commit e0d1d88

Browse files
committed
chore: Add comments about including areArtifactsEquals helper method
1 parent 1b63957 commit e0d1d88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dependencies/src/main/java/com/google/cloud/tools/opensource/classpath/LinkageChecker.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ private LinkageChecker(
158158
}
159159

160160
/**
161-
* Two artifacts are considered equal if the Maven Coordinates (GAV) are equal
161+
* Two artifacts are considered equal if only the Maven Coordinates (GAV) are equal. This is
162+
* included instead of using Artifact.equals() because the `equals()` implementation
163+
* of DefaultArtifact checks more fields than just the GAV Coordinates (also checks the classifier,
164+
* file path, properties, etc are all equal).
162165
*/
163166
private boolean areArtifactsEquals(Artifact artifact1, Artifact artifact2) {
164167
return artifact1.getGroupId().equals(artifact2.getGroupId())

0 commit comments

Comments
 (0)