diff --git a/provider/internal/java/provider.go b/provider/internal/java/provider.go index 016346d5..c2d585f4 100644 --- a/provider/internal/java/provider.go +++ b/provider/internal/java/provider.go @@ -45,6 +45,7 @@ var locationToCode = map[string]int{ "import": 8, "variable_declaration": 9, "type": 10, + "package": 11, } type javaProvider struct { diff --git a/provider/internal/java/service_client.go b/provider/internal/java/service_client.go index 13f87c84..092a30ec 100644 --- a/provider/internal/java/service_client.go +++ b/provider/internal/java/service_client.go @@ -72,6 +72,8 @@ func (p *javaServiceClient) Evaluate(cap string, conditionInfo []byte) (provider incidents, err = p.filterVariableDeclaration(symbols) case 10: incidents, err = p.filterTypeReferences(symbols) + case 11: + incidents, err = p.filterDefault(symbols) default: } @@ -196,7 +198,7 @@ func (p *javaServiceClient) initialization() { } var result protocol.InitializeResult - for i:=0; i < 10; i++ { + for i := 0; i < 10; i++ { if err := p.rpc.Call(p.ctx, "initialize", params, &result); err != nil { p.log.Error(err, "initialize failed") continue