Karthikvb / checkthread

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

Generic interfaces not supported #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create Interface that has a method that takes a generic parameter
2. Create class implemented the interface.
3. Run checkthread. It will fail, complains: "The method doNothing must have 
thesame CheckThread annotation as its superclass."

Source: 

import org.checkthread.annotations.ThreadSafe;

public interface SomeInterface<T> {
    @ThreadSafe
    void doNothing(T obj);  
}
class SomeImplementation implements SomeInterface<String> {

    @ThreadSafe
    public void doNothing(String obj){
        System.out.println("nothing");
    }
}

What is the expected output? What do you see instead?
Expect no errors to show when running checkthreads.

What version of the product are you using? On what operating system?
checkthreads 1.0.9, Eclipse 3.6, OS X 10.6.

Please provide any additional information below.

Original issue reported on code.google.com by pas...@gmail.com on 10 Jan 2011 at 2:30

Attachments: