We have no idea whether it's safe or not - we don't know what someField.method()
does.
I would strongly encourage you to make someField
a final
field, as if the singleton needs to mutate state then it's definitely not thread-safe without extra synchronization. If SomeClass
itself is immutable and thread-safe, then you shouldn't need any other synchronization - but otherwise, you will.
Basically, there's nothing "magically thread-safe" about a singleton. It's just a single instance which multiple threads will have access to via the static getInstance()
method. If the class is thread-safe, it's thread-safe regardless of whether it's a singleton - and if it's not thread-safe, then making it a singleton won't do anything to help that.