void () { ThreadingAssertions.assertEventDispatchThread(); // we might show a dialog Application app = ApplicationManager.getApplication(); if (!app.isWriteAccessAllowed()) return; if (app.isUnitTestMode() && Registry.is("tests.assert.clear.read.only.status.outside.write.action")) { LOG.error("ensureFilesWritable should be called outside write action"); } }