This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 89594

Summary: Please define an annotation to mark methods that could only be called from the AWT Event Thread
Product: platform Reporter: Tim Lebedkov <lebedkov>
Component: -- Other --Assignee: issues@platform <issues>
Status: NEW ---    
Severity: blocker CC: jglick, phejl
Priority: P3 Keywords: API
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 137437    
Bug Blocks:    

Description Tim Lebedkov 2006-11-19 12:15:30 UTC

package org.openide.util;

 * Annotation for methods that should be called on the AWT Event Queue Thread.
 * @author tl
public @interface AWTThreadAnnotation {

Thank You
Comment 1 David Simonek 2008-10-23 12:05:53 UTC
Passing to java, I don't know if we have anything like that or if JDK should define it itself?
Comment 2 Jan Lahoda 2008-11-06 09:16:14 UTC
Might be useful. It would be of course perfect in JDK would define that annotation, but that is a bit out of scope of
NetBeans, IMO.

Anyway, I do not see the relation to the Java support (the java component). Do you think that annotation should be
defined only for modules that use Java support modules? That does not seem right to me. My expectation would be that the
platform should provide such annotation. Somewhat related to issue #137437, so passing to the same component as that
issue uses.
Comment 3 Jesse Glick 2009-01-22 19:07:03 UTC
Not sure what the purpose would be; I don't know of any tool which could statically analyze your code to see if it were
potentially calling such methods off EQ. (Nor do I know how static analysis could make such a determination in any but
the most trivial cases.) Without such a tool, there is no advantage over simply mentioning this constraint in the Javadoc.