About ProjectManager getDefaultProject!

My code is showed below. How can i prevent it to throw exception?


java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:66)
at com.intellij.openapi.application.b.b.assertIsDispatchThread(b.java:291)
at com.intellij.openapi.components.a.a.a(a.java:66)
at com.intellij.openapi.components.a.a.getComponent(a.java:212)
at com.intellij.openapi.components.a.a.o(a.java:36)
at com.intellij.openapi.components.a.a.j(a.java:185)
at com.intellij.openapi.project.a.c.u(c.java:82)
at com.intellij.openapi.project.a.d.u(d.java:208)
at com.intellij.openapi.project.a.b.getDefaultProject(b.java:7)

Please sign in to leave a comment.