zalando / intellij-swagger

A plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA
https://plugins.jetbrains.com/plugin/8347
MIT License
1.17k stars 74 forks source link

Deprecation exception `AnnotationBuilder#createAnnotation` #331

Closed gindex closed 2 years ago

gindex commented 2 years ago

Intellij IDEA: 2021.3.1 Swagger plugin: 1.1.2

Exception:

java.lang.Throwable: 'AnnotationBuilder#createAnnotation' is deprecated and going to be removed soon. Use `#create()` instead
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
    at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:105)
    at com.intellij.codeInsight.daemon.impl.B.createAnnotation(B.java:351)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.warn(UnusedRefAnnotator.java:80)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.lambda$annotate$0(UnusedRefAnnotator.java:49)
    at java.base/java.util.Optional.ifPresent(Optional.java:183)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.lambda$annotate$1(UnusedRefAnnotator.java:43)
    at java.base/java.util.Optional.ifPresent(Optional.java:183)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.annotate(UnusedRefAnnotator.java:38)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:131)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:108)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:344)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$7(GeneralHighlightingPass.java:277)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:303)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:306)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:306)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:274)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:181)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
bhattraideb commented 2 years ago

I am also getting this error, what will be the fix for this?

SergioFloresG commented 2 years ago

PyCharm 2021.3.2 (Professional Edition) Build #PY-213.6777.50, built on January 27, 2022 Runtime version: 11.0.13+7-b1751.25 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.2.1

Non-Bundled Plugins: org.zalando.intellij.swagger (1.1.2)

Exception:

java.lang.Throwable: 'AnnotationBuilder#createAnnotation' is deprecated and going to be removed soon. Use `#create()` instead
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
    at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:105)
    at com.intellij.codeInsight.daemon.impl.B.createAnnotation(B.java:351)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.warn(UnusedRefAnnotator.java:80)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.lambda$annotate$0(UnusedRefAnnotator.java:49)
    at java.base/java.util.Optional.ifPresent(Optional.java:183)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.lambda$annotate$1(UnusedRefAnnotator.java:43)
    at java.base/java.util.Optional.ifPresent(Optional.java:183)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.annotate(UnusedRefAnnotator.java:38)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:131)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:108)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:344)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$7(GeneralHighlightingPass.java:277)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:303)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:306)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:306)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:274)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:181)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Bifi1992 commented 2 years ago

Same issue here.

IntelliJ IDEA 2021.3.2 (Community Edition) Build #IC-213.6777.52, built on January 28, 2022 Runtime version: 11.0.13+7-b1751.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.13.0-35-generic GC: G1 Young Generation, G1 Old Generation Memory: 1966M Cores: 8 Non-Bundled Plugins: org.toml.lang (213.5744.224) org.zalando.intellij.swagger (1.1.2) idea.plugin.protoeditor (213.6461.28) com.haulmont.jpab (2022.1.2-213) MavenRunHelper (4.20.213.3714.1)

Kotlin: 213-1.6.10-release-961-IJ6777.52 Current Desktop: ubuntu:GNOME

trace:

java.lang.Throwable: 'AnnotationBuilder#createAnnotation' is deprecated and going to be removed soon. Use `#create()` instead
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
    at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:105)
    at com.intellij.codeInsight.daemon.impl.B.createAnnotation(B.java:351)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.warn(UnusedRefAnnotator.java:80)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.lambda$annotate$0(UnusedRefAnnotator.java:51)
    at java.base/java.util.Optional.ifPresent(Optional.java:183)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.lambda$annotate$1(UnusedRefAnnotator.java:43)
    at java.base/java.util.Optional.ifPresent(Optional.java:183)
    at org.zalando.intellij.swagger.annotator.openapi.UnusedRefAnnotator.annotate(UnusedRefAnnotator.java:38)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:131)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:108)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:344)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$7(GeneralHighlightingPass.java:283)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:303)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:306)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:306)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:274)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:181)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
gindex commented 2 years ago

@tkrop could you take a look at the pr? Thanks.

tkrop commented 2 years ago

@gindex sorry for the delay and thank you for the contribution. I will try to release this soon.

nomadaryan commented 1 year ago

Is this release yet?

SergioFloresG commented 1 year ago

@gindex sorry for the delay and thank you for the contribution. I will try to release this soon.

@nomadaryan "soon" means approximately, sometime in 2030

vonboth commented 1 year ago

When is this going to be released? It's getting anoying to get this silly error again and again.