Accessing file system (maybe network) from EDT hangs the IDE,
to prevent coding this way we could add give warning in dev version if it happens, proposed places for this warning:
Not that I am huge fan of such change, but if you pass an API review, I will not block it.
Created attachment 126326 [details]
proposed patch for FileUtil.normalizeFileImpl
Please review the proposed patch, for not it only covers FileUtil.normalizeFileImpl, I want to agree on general approach
Y01 Use EventQueue.isDispatchThread()
Y02 I would turn the check on only if asserts are enabled.
Created attachment 137619 [details]
proposed patch 2
the new proposed patch, I also think that such exceptions has to be reported once, so StackElementArray has to appear in Utilities. Maybe it is even better to introduce Exceptions.printStackTraceOnce based on that to simplify such cases.
The performance team has some more advanced tool for diagnosis of I/O calls.
So this warning should not be necessary.
CCing Tomas Hurka, who could provide more information about it.
Closing for now. Thank you for understanding.
This bug was not about diagnosis, but about avoiding regressions and bad coding practice. Can advanced tools you mention prevent regressions?
(In reply to comment #6)
> Can advanced tools you mention prevent regressions?
I think so.