MediumOne / checkthread

Automatically exported from code.google.com/p/checkthread
0 stars 0 forks source link

Problems using ThreadConfined(EDT) and Initialization on demand holder idiom #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. I am using the (for this issue very reduced) class which I provided as
an attachment.
2. I have implemented a simple "Initialization on demand holder idiom"
since I only need one status bar which this class is for. The getter method
is intended to be invoked by Swings EDT - hence ThreadConfined. 
3. Running CheckThread on my project gave me the error below.

What is the expected output? What do you see instead?

Expected is that everything works just fine since getSingleton() is invoked
by the EDT and the output in the constructor prints "true". 
Instead I get:

The method Static block has a 'MAIN' thread policy, but the invoked method
'test.CustomPanel' has a 'EDT' thread policy. (line 14 is marked)

What version of the product are you using? On what operating system?

Eclipse SDK Version: 3.5.1
x86_64 GNU/Linux
checkthread-eclipse-plugin-1.0.9

Please provide any additional information below.

Original issue reported on code.google.com by kizkizzb...@googlemail.com on 23 Apr 2010 at 11:48

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by joe.jco...@gmail.com on 30 Apr 2010 at 12:53