Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin fails on non-swagger YAML files #293

Open
middlewareman opened this issue Oct 23, 2019 · 0 comments
Open

Plugin fails on non-swagger YAML files #293

middlewareman opened this issue Oct 23, 2019 · 0 comments

Comments

@middlewareman
Copy link

This has caused failure to save YAML files.

Error while indexing /Users/anny/Xyz/MyIdeaProject/Something/NotOpenAPIorSwagger.yaml
To reindex this file IDEA has to be restarted

java.lang.ClassCastException: class com.intellij.openapi.file.exclude.EnforcedPlainTextFileTypeFactory$2 cannot be cast to class com.intellij.openapi.fileTypes.LanguageFileType (com.intellij.openapi.file.exclude.EnforcedPlainTextFileTypeFactory$2 and com.intellij.openapi.fileTypes.LanguageFileType are in unnamed module of loader com.intellij.util.lang.UrlClassLoader @4566e5bd)
	at com.intellij.util.indexing.FileContentImpl.createFileFromText(FileContentImpl.java:138)
	at com.intellij.util.indexing.FileContentImpl.getFileFromText(FileContentImpl.java:106)
	at com.intellij.util.indexing.FileContentImpl.getPsiFileForPsiDependentIndex(FileContentImpl.java:274)
	at com.intellij.util.indexing.FileContentImpl.getPsiFile(FileContentImpl.java:94)
	at org.zalando.intellij.swagger.index.SpecIndexer.map(SpecIndexer.java:50)
	at org.zalando.intellij.swagger.index.SpecIndexer.map(SpecIndexer.java:25)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:312)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:109)
	at com.intellij.util.indexing.impl.MapReduceIndex.calculateUpdateData(MapReduceIndex.java:268)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:250)
	at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1680)
	at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$28(FileBasedIndexImpl.java:1605)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:656)
	at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1564)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1550)
	at com.intellij.util.indexing.UnindexedFilesUpdater.lambda$indexFiles$0(UnindexedFilesUpdater.java:109)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$0(CacheUpdateRunner.java:219)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$1(CacheUpdateRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:232)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant