More Static Checking?

I’m wondering whether I should warn about unnecessary annotations, e.g. if a method is annotated, but the supermethod is, too. It’s not strictly necessary, but it may be a good idea for clarity and conciseness. Then again, it’s additional documentation.

I’m also thinking that perhaps I should do some static checking when certain thread properties are known for a method. The main method could, for example, be annotated with @RunsThread(@ThreadDesc(name="main", group="main", id=1, eventThread=false)). Other threads could run it too, but this is definitely one possibility. When a call is made to a method annotated with @NotRunBy that matches this description or @OnlyRunBy that doesn’t match this description, a static error could be generated.


About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in Concurrent Unit Testing. Bookmark the permalink.

Leave a Reply