Doesn't use toString() method for nested properties
ryanlewis opened this issue · comments
Ryan Lewis commented
Consider the following example:
data class Credentials(val username: String, val password: String)
data class Config(val credentials: Credentials)
val config = Config(Credentials("foo", "bar"))
println("using $config")
// using Config(credentials=Credentials(username=foo, password=bar))
If using Sekret and adding @Secret
to the password property of the Credentials class, you get output like the following instead:
using Config(credentials=Credentials@27a6ea4)
Anatolii Afanasev commented
I'm not able to repro with Kotlin 1.8.0 + Sekret 0.1.4 + Gradle 7.4.2
build.gradle.kts
plugins {
kotlin("jvm") version "1.8.0"
id("net.afanasev.sekret") version "0.1.4"
application
}
group = "org.example"
version = "1.0-SNAPSHOT"
application {
mainClass.set("MainKt")
}
repositories {
mavenCentral()
}
dependencies {
implementation("net.afanasev:sekret-annotation:0.1.4")
}
Could you share your environment details?
Ryan Lewis commented
I'll close this one - I think this possibly could have been some cached build artifacts built prior to your latest release.