I wouldn't advise field hiding
# announcements
x
I wouldn't advise field hiding
e
That's not my concern, I just need a way to do it
I got resolution ambiguity when trying to do this in Kotlin
x
sorry, no idea, most quality analysis tools correctly complain about it in java, so , good luck (honestly new to kotlin so wouldn't have an idea either way)
also you say it's public and I think that type is mutable, which is a security issue if you're running on a shared jvm
and it's not thread safe
that said I can empathize with "I need to do it"
e
Well the parent class is not written by me
x
I figured
but why can't the subclass have a different name
and not be public
e
And I'm trying to convert a child class to Kotlin, but the child class uses this field hiding technique, so I'm trying to find a way to do it
x
yeah, I don't know, sorry
I'd consider just giving the field a different name
and accessing it with accessors
but, yeah, sorry, not of much help
e
Nevermind