pbyrne84 / DynamicReturnTypePlugin

135 stars 7 forks source link

Index out of bounds exception #51

Closed norrs closed 8 years ago

norrs commented 9 years ago

Got this with phpstorm build PS-142.4707 , 9.5 EAP. Unsure if this is something you are interested in or not.

String index out of range: 2 java.lang.StringIndexOutOfBoundsException: String index out of range: 2 at java.lang.String.substring(String.java:1963) at kotlin.KotlinPackage$StringsJVM$301a07cb.substring(StringsJVM.kt:151) at kotlin.KotlinPackage.substring(Unknown Source) at com.ptby.dynamicreturntypeplugin.signature_processingv2.SingleCallSignatureProcessor.getParameterFormatterForSignature(SingleCallSignatureProcessor.kt:19) at com.ptby.dynamicreturntypeplugin.signature_processingv2.ChainedSignatureProcessor.parseSignature(ChainedSignatureProcessor.kt:30) at com.ptby.dynamicreturntypeplugin.signature_processingv2.GetBySignature.getBySignature(GetBySignature.kt:38) at com.ptby.dynamicreturntypeplugin.DynamicReturnTypeProvider.getBySignature(DynamicReturnTypeProvider.kt:110) at com.jetbrains.php.PhpIndexImpl.getBySignatureInternal(PhpIndexImpl.java:419) at com.jetbrains.php.PhpIndexImpl.getBySignature(PhpIndexImpl.java:305) at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:82) at com.jetbrains.php.lang.psi.resolve.types.PhpType.globalLocationAware(PhpType.java:404) at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveGlobal(MemberReferenceImpl.java:143) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:141) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:138) at com.intellij.psi.impl.source.resolve.ResolveCache$3.compute(ResolveCache.java:142) at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112) at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:139) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:159) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.multiResolve(PhpReferenceImpl.java:133) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.resolve(PhpReferenceImpl.java:119) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.checkAccessModifiers(PhpAnnotatorVisitor.java:391) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.visitPhpFieldReference(PhpAnnotatorVisitor.java:321) at com.jetbrains.php.lang.psi.elements.impl.FieldReferenceImpl.accept(FieldReferenceImpl.java:40) at com.jetbrains.php.lang.annotator.PhpAnnotator.annotate(PhpAnnotator.java:19) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:159) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:354) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$100(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$3.run(GeneralHighlightingPass.java:283) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:308) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314) at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:750) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:311) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:311) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:280) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1172) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:432) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260) at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858) at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687) at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642) at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)

pbyrne84 commented 9 years ago

Yep, it is something I am interested in, I'll shove a fix up tonight. Cheers

On 16 September 2015 at 12:10, Roy Sindre Norangshol < notifications@github.com> wrote:

Got this with phpstorm build PS-142.4707 , 9.5 EAP. Unsure if this is something you are interested in or not.

String index out of range: 2 java.lang.StringIndexOutOfBoundsException: String index out of range: 2 at java.lang.String.substring(String.java:1963) at kotlin.KotlinPackage$StringsJVM$301a07cb.substring(StringsJVM.kt:151) at kotlin.KotlinPackage.substring(Unknown Source) at com.ptby.dynamicreturntypeplugin.signature_processingv2.SingleCallSignatureProcessor.getParameterFormatterForSignature(SingleCallSignatureProcessor.kt:19) at com.ptby.dynamicreturntypeplugin.signature_processingv2.ChainedSignatureProcessor.parseSignature(ChainedSignatureProcessor.kt:30) at com.ptby.dynamicreturntypeplugin.signature_processingv2.GetBySignature.getBySignature(GetBySignature.kt:38) at com.ptby.dynamicreturntypeplugin.DynamicReturnTypeProvider.getBySignature(DynamicReturnTypeProvider.kt:110) at com.jetbrains.php.PhpIndexImpl.getBySignatureInternal(PhpIndexImpl.java:419) at com.jetbrains.php.PhpIndexImpl.getBySignature(PhpIndexImpl.java:305) at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:82) at com.jetbrains.php.lang.psi.resolve.types.PhpType.globalLocationAware(PhpType.java:404) at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveGlobal(MemberReferenceImpl.java:143) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:141) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:138) at com.intellij.psi.impl.source.resolve.ResolveCache$3.compute(ResolveCache.java:142) at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112) at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:139) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:159) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.multiResolve(PhpReferenceImpl.java:133) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.resolve(PhpReferenceImpl.java:119) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.checkAccessModifiers(PhpAnnotatorVisitor.java:391) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.visitPhpFieldReference(PhpAnnotatorVisitor.java:321) at com.jetbrains.php.lang.psi.elements.impl.FieldReferenceImpl.accept(FieldReferenceImpl.java:40) at com.jetbrains.php.lang.annotator.PhpAnnotator.annotate(PhpAnnotator.java:19) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:159) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:354) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$100(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$3.run(GeneralHighlightingPass.java:283) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:308) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314) at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:750) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:311) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:311) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:280) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1172) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:432) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260) at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858) at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687) at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642) at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)

— Reply to this email directly or view it on GitHub https://github.com/pbyrne84/DynamicReturnTypePlugin/issues/51.

pbyrne84 commented 8 years ago

Should be fixed

On 16 September 2015 at 12:19, Patrick Byrne pbyrne84@googlemail.com wrote:

Yep, it is something I am interested in, I'll shove a fix up tonight. Cheers

On 16 September 2015 at 12:10, Roy Sindre Norangshol < notifications@github.com> wrote:

Got this with phpstorm build PS-142.4707 , 9.5 EAP. Unsure if this is something you are interested in or not.

String index out of range: 2 java.lang.StringIndexOutOfBoundsException: String index out of range: 2 at java.lang.String.substring(String.java:1963) at kotlin.KotlinPackage$StringsJVM$301a07cb.substring(StringsJVM.kt:151) at kotlin.KotlinPackage.substring(Unknown Source) at com.ptby.dynamicreturntypeplugin.signature_processingv2.SingleCallSignatureProcessor.getParameterFormatterForSignature(SingleCallSignatureProcessor.kt:19) at com.ptby.dynamicreturntypeplugin.signature_processingv2.ChainedSignatureProcessor.parseSignature(ChainedSignatureProcessor.kt:30) at com.ptby.dynamicreturntypeplugin.signature_processingv2.GetBySignature.getBySignature(GetBySignature.kt:38) at com.ptby.dynamicreturntypeplugin.DynamicReturnTypeProvider.getBySignature(DynamicReturnTypeProvider.kt:110) at com.jetbrains.php.PhpIndexImpl.getBySignatureInternal(PhpIndexImpl.java:419) at com.jetbrains.php.PhpIndexImpl.getBySignature(PhpIndexImpl.java:305) at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:82) at com.jetbrains.php.lang.psi.resolve.types.PhpType.globalLocationAware(PhpType.java:404) at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveGlobal(MemberReferenceImpl.java:143) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:141) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:138) at com.intellij.psi.impl.source.resolve.ResolveCache$3.compute(ResolveCache.java:142) at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112) at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:139) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:159) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.multiResolve(PhpReferenceImpl.java:133) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.resolve(PhpReferenceImpl.java:119) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.checkAccessModifiers(PhpAnnotatorVisitor.java:391) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.visitPhpFieldReference(PhpAnnotatorVisitor.java:321) at com.jetbrains.php.lang.psi.elements.impl.FieldReferenceImpl.accept(FieldReferenceImpl.java:40) at com.jetbrains.php.lang.annotator.PhpAnnotator.annotate(PhpAnnotator.java:19) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:159) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:354) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$100(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$3.run(GeneralHighlightingPass.java:283) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:308) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314) at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:750) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:311) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:311) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:280) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1172) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:432) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206) at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260) at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858) at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687) at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642) at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)

— Reply to this email directly or view it on GitHub https://github.com/pbyrne84/DynamicReturnTypePlugin/issues/51.