Skip to content

Commit 4b16547

Browse files
authored
refactor(server): simplify JarArtifact class (#1358)
Part of #1318. There's no need to override this because the class's objects are used as values, not as map/set keys.
1 parent 7b90b6b commit 4b16547

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

maven-binding-builder/src/main/kotlin/io/github/typesafegithub/workflows/mavenbinding/VersionArtifactsBuilding.kt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,7 @@ sealed interface Artifact
66

77
data class TextArtifact(val data: String) : Artifact
88

9-
data class JarArtifact(val data: ByteArray) : Artifact {
10-
override fun equals(other: Any?): Boolean {
11-
if (this === other) return true
12-
if (javaClass != other?.javaClass) return false
13-
14-
other as JarArtifact
15-
16-
return data.contentEquals(other.data)
17-
}
18-
19-
override fun hashCode(): Int {
20-
return data.contentHashCode()
21-
}
22-
}
9+
data class JarArtifact(val data: ByteArray) : Artifact
2310

2411
fun ActionCoords.buildVersionArtifacts(): Map<String, Artifact> {
2512
val jar = buildJar(owner = owner, name = name.replace("__", "/"), version = version)

0 commit comments

Comments
 (0)