java.lang.AssertionError: This method should only be called in unit tests

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by jakud
, 1 year ago
This method should only be called in unit tests
via GitHub by jakud
, 1 year ago
This method should only be called in unit tests
via GitHub by human87
, 1 year ago
This method should only be called in unit tests
via GitHub by istocniks
, 1 year ago
This method should only be called in unit tests
java.lang.AssertionError: This method should only be called in unit tests
at org.intellij.erlang.psi.impl.ErlangFileImpl.getFileTypeForTests(ErlangFileImpl.java:316)
at org.intellij.erlang.psi.impl.ErlangFileImpl.getFileType(ErlangFileImpl.java:307)
at com.intellij.psi.codeStyle.DetectableIndentOptionsProvider.a(DetectableIndentOptionsProvider.java:104)
at com.intellij.psi.codeStyle.DetectableIndentOptionsProvider.getIndentOptions(DetectableIndentOptionsProvider.java:62)
at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:664)
at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:630)
at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:625)
at com.intellij.openapi.editor.impl.SettingsImpl.getTabSize(SettingsImpl.java:371)
at com.intellij.openapi.editor.impl.view.EditorView.getTabSize(EditorView.java:434)
at com.intellij.openapi.editor.impl.view.LogicalPositionCache.reset(LogicalPositionCache.java:70)
at com.intellij.openapi.editor.impl.view.EditorView.reinitSettings(EditorView.java:292)
at com.intellij.openapi.editor.impl.EditorImpl.(EditorImpl.java:569)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.a(EditorFactoryImpl.java:193)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:169)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.h(TextEditorComponent.java:165)
at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.(TextEditorComponent.java:100)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.(PsiAwareTextEditorImpl.java:93)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.(PsiAwareTextEditorImpl.java:86)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:71)
at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.(TextEditorImpl.java:52)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.(PsiAwareTextEditorImpl.java:44)
at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:47)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:872)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2418)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:971)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:788)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:770)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:129)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:100)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:86)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:770)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:711)
at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:145)
at com.intellij.ide.scratch.ScratchFileActions.doCreateNewScratch(ScratchFileActions.java:131)
at com.intellij.ide.scratch.ScratchFileActions$NewFileAction.a(ScratchFileActions.java:75)
at com.intellij.ide.scratch.LRUPopupBuilder$3.a(LRUPopupBuilder.java:192)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:199)
at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1390)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.i(IdeEventQueue.java:829)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:665)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.