|
Alexey,
Unfortunately we can't support multithread
logic in analyzer because it would make any inspections completely useless.
Imagine we have:
a = 5;
if (a == 5) {}
According to you we can't complain a == 5 is always
true because this thread could be interrupted between these thow lines of
code!
Moreover, your code does not help in the situation
it seems should help in. Imagine the thread would switch between after condition
in line 28 succesfully checked and before assignment in line 29 is
executed...
If you'd like to play safe game you should remove
condition in line 23 or make the whole method synchronized.
Best regards, Maxim Shafirov JetBrains, Inc / IntelliJ Software http://www.intellij.com "Develop with pleasure!"
|
Title: BUG: Code Inspection: Singleton not recognized
- [Eap-list] BUG: Code Inspection: Singleton not recognized Alexey A. Efimov
- RE: [Eap-list] BUG: Code Inspection: Singleton not r... Maxim Shafirov
- RE: [Eap-list] BUG: Code Inspection: Singleton not r... Alexey A. Efimov
- RE: [Eap-list] BUG: Code Inspection: Singleton n... Mike Aizatsky
- [Eap-list] Full screen blinking Christopher Cobb
- [Eap-list] Re: Full screen blinking -- f... Christopher Cobb
- SV: [Eap-list] BUG: Code Inspection: Singleton not r... Patrik Andersson
- RE: [Eap-list] BUG: Code Inspection: Singleton not r... Alexey A. Efimov
- RE: [Eap-list] BUG: Code Inspection: Singleton not r... Alexey A. Efimov
- RE: [Eap-list] BUG: Code Inspection: Singleton n... Jonas Kvarnstr�m
- RE: [Eap-list] BUG: Code Inspection: Singleton not r... Tom Wagner
- RE: [Eap-list] BUG: Code Inspection: Singleton n... Jonas Kvarnstr�m
