Skip to content

Commit

Permalink
Technical: Use equals without referencing javaClass.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed Jun 25, 2024
1 parent 8c4cc9e commit 47cacd5
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal class AndroidxEmoji2 internal constructor(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
if (other == null || this::class != other::class) return false

other as AndroidxEmoji2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal class FacebookEmoji internal constructor(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
if (other == null || this::class != other::class) return false

other as FacebookEmoji

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal class GoogleCompatEmoji internal constructor(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
if (other == null || this::class != other::class) return false

other as GoogleCompatEmoji

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal class GoogleEmoji internal constructor(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
if (other == null || this::class != other::class) return false

other as GoogleEmoji

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal class IosEmoji internal constructor(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
if (other == null || this::class != other::class) return false

other as IosEmoji

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal class TwitterEmoji internal constructor(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
if (other == null || this::class != other::class) return false

other as TwitterEmoji

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ data class TestEmoji internal constructor(

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
if (other == null || this::class != other::class) return false

other as TestEmoji

Expand Down

0 comments on commit 47cacd5

Please sign in to comment.