Skip to content

Commit ccffc22

Browse files
committed
refactor: use data class
1 parent 674d10c commit ccffc22

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/main/kotlin/spp/protocol/artifact/exception/LiveStackTrace.kt

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import spp.protocol.artifact.ArtifactLanguage
2727
* @author [Brandon Fergerson](mailto:bfergerson@apache.org)
2828
*/
2929
@DataObject
30-
class LiveStackTrace(
30+
data class LiveStackTrace(
3131
var exceptionType: String,
3232
var message: String?,
3333
val elements: MutableList<LiveStackTraceElement>,
@@ -175,24 +175,4 @@ class LiveStackTrace(
175175
}
176176
return builder.toString()
177177
}
178-
179-
override fun equals(other: Any?): Boolean {
180-
if (this === other) return true
181-
if (other !is LiveStackTrace) return false
182-
if (exceptionType != other.exceptionType) return false
183-
if (message != other.message) return false
184-
if (elements != other.elements) return false
185-
if (causedBy != other.causedBy) return false
186-
if (language != other.language) return false
187-
return true
188-
}
189-
190-
override fun hashCode(): Int {
191-
var result = exceptionType.hashCode()
192-
result = 31 * result + (message?.hashCode() ?: 0)
193-
result = 31 * result + elements.hashCode()
194-
result = 31 * result + (causedBy?.hashCode() ?: 0)
195-
result = 31 * result + language.hashCode()
196-
return result
197-
}
198178
}

0 commit comments

Comments
 (0)