0
Исправлено

Singleton Example: synchronized(this) in static context

Micha D. Rosenbaum 5 лет назад обновлен 4 года назад 2

When I try to use your code of the thread-safe Singleton example, I get an error because of the use of this in an static context. Should `this` be replaced by `Singleton.class` in this example?

Ответ

+2
Ответ
Исправлено

Hi Micha!

This was an unfortunate result of my recent update for this example. Please check it now, everything should be fine.

ХОРОШО, МНЕ ПОНРАВИЛОСЬ
Оценка удовлетворенности от Micha D. Rosenbaum 4 года назад
+2
Ответ
Исправлено

Hi Micha!

This was an unfortunate result of my recent update for this example. Please check it now, everything should be fine.

Thanks for your fast response, Alexander! Looks good.

Сервис поддержки клиентов работает на платформе UserEcho