void () { assertEquals(HEAP, DefaultIdeaErrorLogger.getOOMErrorKind(new OutOfMemoryError())); assertEquals(HEAP, DefaultIdeaErrorLogger.getOOMErrorKind(new OutOfMemoryError("whatever"))); assertNull(DefaultIdeaErrorLogger.getOOMErrorKind(new OutOfMemoryError("unable to create new native thread"))); assertNull(DefaultIdeaErrorLogger.getOOMErrorKind(new OutOfMemoryError("unable to create native thread: ... limits reached"))); assertEquals(METASPACE, DefaultIdeaErrorLogger.getOOMErrorKind(new OutOfMemoryError("Metaspace"))); assertEquals(DIRECT_BUFFERS, DefaultIdeaErrorLogger.getOOMErrorKind(new OutOfMemoryError("Cannot reserve X bytes of direct buffer memory ..."))); assertEquals(CODE_CACHE, DefaultIdeaErrorLogger.getOOMErrorKind(new InternalError("CodeCache is full"))); }