-
Notifications
You must be signed in to change notification settings - Fork 567
Description
This go file causes repeated ArrayIndexOutOfBoundsExceptions to be thrown:
package main
import (
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/openstack/compute/v2/servers"
//"github.com/rackspace/gophercloud/pagination"
)
func GetServers(pc *gophercloud.ProviderClient, opts servers.ListOpts) (serverList *[]servers.Server, err error) {
serverList = new([]servers.Server)
pager := servers.List(pc, opts)
err = pager.EachPage(func(page pagination.Page) (bool, error) {
serverList, err := servers.ExtractServers(page)
for _, s := range serverList {
serverList = append(&serverList, s)
}
})
return serverList, err
}
Plugin Name: Go language (golang.org) support plugin
Plugin Version: 0.9.16-dev-0.9.16-alpha.7^0
OS Name: Mac OS X
Java version: 1.6.0_65
Java vm vendor: Apple Inc.
App Name: IDEA
App Full Name: IntelliJ IDEA
App Version name: IntelliJ IDEA
Is EAP: false
App Build: IC-139.1117
App Version: 14.0.3
Last Action: EditorCopy
java.lang.ArrayIndexOutOfBoundsException: 0
at ro.redeul.google.go.inspection.FunctionCallInspection.validateAppendCall(FunctionCallInspection.java:318)
at ro.redeul.google.go.inspection.FunctionCallInspection.validateBuiltinCall(FunctionCallInspection.java:83)
at ro.redeul.google.go.inspection.FunctionCallInspection.access$100(FunctionCallInspection.java:17)
at ro.redeul.google.go.inspection.FunctionCallInspection$1.visitCallOrConvExpression(FunctionCallInspection.java:43)
at ro.redeul.google.go.inspection.FunctionCallInspection$1.visitBuiltinCallExpression(FunctionCallInspection.java:24)
at ro.redeul.google.go.lang.psi.impl.expressions.primary.GoBuiltinCallOrConversionExpressionImpl.accept(GoBuiltinCallOrConversionExpressionImpl.java:263)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.accept(GoPsiElementBase.java:49)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitAssignment(GoElementVisitor.java:268)
at ro.redeul.google.go.lang.psi.impl.statements.GoAssignmentStatementImpl.accept(GoAssignmentStatementImpl.java:70)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitBlockStatement(GoElementVisitor.java:248)
at ro.redeul.google.go.lang.psi.impl.statements.GoBlockStatementImpl.accept(GoBlockStatementImpl.java:45)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitForWithRangeAndVars(GoElementVisitor.java:144)
at ro.redeul.google.go.lang.psi.impl.statements.GoForWithRangeAndVarsStatementImpl.accept(GoForWithRangeAndVarsStatementImpl.java:50)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitBlockStatement(GoElementVisitor.java:248)
at ro.redeul.google.go.lang.psi.impl.statements.GoBlockStatementImpl.accept(GoBlockStatementImpl.java:45)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitFunctionLiteral(GoElementVisitor.java:136)
at ro.redeul.google.go.lang.psi.impl.expressions.literals.GoLiteralFunctionImpl.accept(GoLiteralFunctionImpl.java:104)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitLiteralExpression(GoElementVisitor.java:124)
at ro.redeul.google.go.lang.psi.impl.expressions.primary.GoLiteralExpressionImpl.accept(GoLiteralExpressionImpl.java:44)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitCallOrConvExpression(GoElementVisitor.java:208)
at ro.redeul.google.go.inspection.FunctionCallInspection$1.visitCallOrConvExpression(FunctionCallInspection.java:29)
at ro.redeul.google.go.lang.psi.impl.expressions.primary.GoCallOrConvExpressionImpl.accept(GoCallOrConvExpressionImpl.java:126)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.accept(GoPsiElementBase.java:49)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitAssignment(GoElementVisitor.java:268)
at ro.redeul.google.go.lang.psi.impl.statements.GoAssignmentStatementImpl.accept(GoAssignmentStatementImpl.java:70)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitBlockStatement(GoElementVisitor.java:248)
at ro.redeul.google.go.lang.psi.impl.statements.GoBlockStatementImpl.accept(GoBlockStatementImpl.java:45)
at ro.redeul.google.go.lang.psi.impl.GoPsiElementBase.acceptChildren(GoPsiElementBase.java:62)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitFunctionDeclaration(GoElementVisitor.java:80)
at ro.redeul.google.go.lang.psi.impl.toplevel.GoFunctionDeclarationImpl.accept(GoFunctionDeclarationImpl.java:125)
at ro.redeul.google.go.lang.psi.impl.GoFileImpl.acceptChildren(GoFileImpl.java:205)
at ro.redeul.google.go.lang.psi.visitors.GoRecursiveElementVisitor.visitElement(GoRecursiveElementVisitor.java:14)
at ro.redeul.google.go.lang.psi.visitors.GoElementVisitor.visitFile(GoElementVisitor.java:56)
at ro.redeul.google.go.inspection.FunctionCallInspection.doCheckFile(FunctionCallInspection.java:21)
at ro.redeul.google.go.inspection.AbstractWholeGoFileInspection.checkFile(AbstractWholeGoFileInspection.java:23)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:149)
at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:70)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:80)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:69)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:289)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$000(LocalInspectionsPass.java:75)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:258)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:255)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:122)
at com.intellij.concurrency.ApplierCompleter.access$000(ApplierCompleter.java:44)
at com.intellij.concurrency.ApplierCompleter$1.run(ApplierCompleter.java:85)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1146)
at com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.registerIndicatorAndRun(ProgressManagerImpl.java:281)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.registerIndicatorAndRun(ProgressManagerImpl.java:278)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:106)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:82)
at jsr166e.CountedCompleter.exec(CountedCompleter.java:684)
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:109)
0