diff -r ab16ccd545a5 masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/FileObj.java --- a/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/FileObj.java Wed Jan 18 05:25:23 2012 +0100 +++ b/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/FileObj.java Wed Jan 18 18:17:06 2012 +0100 @@ -55,6 +55,7 @@ import java.util.Enumeration; import java.util.logging.Level; import java.util.logging.Logger; +import javax.swing.SwingUtilities; import org.netbeans.modules.masterfs.filebasedfs.naming.FileNaming; import org.netbeans.modules.masterfs.filebasedfs.utils.FSException; import org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager; @@ -152,6 +153,9 @@ FSException.annotateException(fex); throw fex; } + if (Boolean.getBoolean("perf.IOAWT") && SwingUtilities.isEventDispatchThread()) { + Exceptions.printStackTrace(new IllegalStateException("getOutputStream invoked in AWT")); // NOI18N + } return retVal; } @@ -211,6 +215,9 @@ throw fex; } assert inputStream != null; + if (Boolean.getBoolean("perf.IOAWT") && SwingUtilities.isEventDispatchThread()) { + Exceptions.printStackTrace(new IllegalStateException("getInputStream invoked in AWT")); // NOI18N + } return inputStream; } diff -r ab16ccd545a5 o.n.bootstrap/src/org/netbeans/TopSecurityManager.java --- a/o.n.bootstrap/src/org/netbeans/TopSecurityManager.java Wed Jan 18 05:25:23 2012 +0100 +++ b/o.n.bootstrap/src/org/netbeans/TopSecurityManager.java Wed Jan 18 18:17:06 2012 +0100 @@ -65,7 +65,9 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.LoggingPermission; +import javax.swing.SwingUtilities; import org.openide.modules.Places; +import org.openide.util.Exceptions; import org.openide.util.Lookup; /** NetBeans security manager implementation. @@ -358,7 +360,9 @@ if (! check) { return; } - + if (Boolean.getBoolean("perf.IOAWT") && SwingUtilities.isEventDispatchThread()) { + Exceptions.printStackTrace(new IllegalStateException("Network call invoked in AWT")); // NOI18N + } try { checkPermission(allPermission); return; @@ -400,6 +404,11 @@ public @Override void checkPermission(Permission perm) { // assert checkLogger(perm); //#178013 & JDK bug 1694855 + if (Boolean.getBoolean("perf.IOAWT")) { + if (perm instanceof java.net.SocketPermission && SwingUtilities.isEventDispatchThread()) { + Exceptions.printStackTrace(new IllegalStateException("Network call invoked in AWT")); // NOI18N + } + } checkSetSecurityManager(perm); //