-
-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix toString() output for Whitelist class #2459
Conversation
@@ -5,6 +5,6 @@ data class Whitelist( | |||
) : Listing<Whitelist> { | |||
|
|||
override fun toString(): String { | |||
return "Blacklist(ids=$ids)" | |||
return "Whitelist(ids=$ids)" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a data class, can't we use the default toString
? If the answer is no, we should add a simple test here to ensure that no one removes it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
data class Whitelist(
override val ids: Set<String>
) : Listing<Whitelist>
fun main() {
println(Whitelist(setOf("1", "2"))) // Whitelist(ids=[1, 2])
}
It actually prints the same string :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the toString
methods of Blacklist and Whitelist.
@@ -5,6 +5,6 @@ data class Whitelist( | |||
) : Listing<Whitelist> { | |||
|
|||
override fun toString(): String { | |||
return "Blacklist(ids=$ids)" | |||
return "Whitelist(ids=$ids)" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
data class Whitelist(
override val ids: Set<String>
) : Listing<Whitelist>
fun main() {
println(Whitelist(setOf("1", "2"))) // Whitelist(ids=[1, 2])
}
It actually prints the same string :)
see #2467 |
No description provided.