ccaominh commented on issue #9179: Run IntelliJ inspections on Travis
URL: https://github.com/apache/druid/pull/9179#issuecomment-576452722
 
 
   When I tried to use IntelliJ 2019.3, running the inspection would print 
several error stack traces, for example:
   ```
   java.lang.NullPointerException
        at 
com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase$2.visitElement(UnusedDeclarationInspectionBase.java:409)
        at 
com.intellij.codeInspection.reference.RefJavaVisitor.visitMethod(RefJavaVisitor.java:32)
        at 
com.intellij.codeInspection.reference.RefMethodImpl.lambda$accept$0(RefMethodImpl.java:338)
        at 
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:791)
        at 
com.intellij.codeInspection.reference.RefMethodImpl.accept(RefMethodImpl.java:338)
        at 
com.intellij.codeInspection.reference.RefManagerImpl.iterate(RefManagerImpl.java:123)
        at 
com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase.queryExternalUsagesRequests(UnusedDeclarationInspectionBase.java:403)
        at 
com.intellij.codeInspection.deadCode.UnusedDeclarationInspection.queryExternalUsagesRequests(UnusedDeclarationInspection.java:100)
        at 
com.intellij.codeInspection.ex.GlobalJavaInspectionContextImpl.performPostRunActivities(GlobalJavaInspectionContextImpl.java:465)
        at 
com.intellij.codeInspection.ex.GlobalInspectionContextImpl.runGlobalTools(GlobalInspectionContextImpl.java:765)
        at 
com.intellij.codeInspection.ex.GlobalInspectionContextImpl.runTools(GlobalInspectionContextImpl.java:448)
        at 
com.intellij.codeInspection.ex.GlobalInspectionContextBase.lambda$performInspectionsWithProgress$3(GlobalInspectionContextBase.java:244)
        at 
com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
        at 
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
        at 
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
        at 
com.intellij.codeInspection.ex.GlobalInspectionContextBase.performInspectionsWithProgress(GlobalInspectionContextBase.java:244)
        at 
com.intellij.codeInspection.ex.GlobalInspectionContextImpl.lambda$performInspectionsWithProgressAndExportResults$1(GlobalInspectionContextImpl.java:188)
        at 
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:791)
        at 
com.intellij.codeInspection.ex.GlobalInspectionContextImpl.performInspectionsWithProgressAndExportResults(GlobalInspectionContextImpl.java:196)
        at 
com.intellij.codeInspection.ex.GlobalInspectionContextImpl.launchInspectionsOffline(GlobalInspectionContextImpl.java:174)
        at 
com.intellij.codeInspection.InspectionApplication.lambda$runUnderProgress$17(InspectionApplication.java:512)
        at 
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
        at 
com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
        at 
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
        at 
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
        at 
com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
        at 
com.intellij.codeInspection.InspectionApplication.runUnderProgress(InspectionApplication.java:505)
        at 
com.intellij.codeInspection.InspectionApplication.runAnalysis(InspectionApplication.java:320)
        at 
com.intellij.codeInspection.InspectionApplication.runAnalysisOnScope(InspectionApplication.java:296)
        at 
com.intellij.codeInspection.InspectionApplication.run(InspectionApplication.java:244)
        at 
com.intellij.codeInspection.InspectionApplication.lambda$execute$0(InspectionApplication.java:144)
        at 
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:821)
        at 
com.intellij.codeInspection.InspectionApplication.execute(InspectionApplication.java:136)
        at 
com.intellij.codeInspection.InspectionApplication.startup(InspectionApplication.java:121)
        at 
com.intellij.codeInspection.InspectionMain.main(InspectionMain.java:97)
        at 
com.intellij.idea.ApplicationLoader$startApp$8$1.run(ApplicationLoader.kt:242)
        at 
com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
        at 
com.intellij.idea.ApplicationLoader$startApp$8.run(ApplicationLoader.kt:241)
        at java.util.concurrent.CompletableFuture.uniRun(Unknown Source)
        at java.util.concurrent.CompletableFuture$UniRun.tryFire(Unknown Source)
        at java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
 Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at 
com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
        at 
com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
        at 
com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
   ```
   
   I haven't determined the cause and even though the inspection analysis does 
seem to complete successfully, I felt it would be better to not pollute the 
inspection output with error stack traces. However, when I tried it, I did 
notice that IntelliJ 2019.3.1 does print 200+ more inspection errors (mostly 
"Method is not reachable from entry points.") than IntelliJ 2018.3.6.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to