Skip to content

Java: More details about nested arrays #6552

@artem-smotrakov

Description

@artem-smotrakov

Given a multi-dimensional array, the extractor doesn't seem to provide enough information about nested sub-arrays.

For example:

public class Test {

    void test() {
        byte[][] array = new byte[][] {
            new byte[] { 1, 2 },
            new byte[] { 3, 4 ,5 }
        };
    }
}

The following query shows only IntegerLiteral and TypeAccess for the nested arrays:

import java

from ArrayCreationExpr array
select array.getInit().getAnInit().getAChildExpr().getAPrimaryQlClass()

Instead, ArrayCreationExpr should be used to represent the nested arrays, shouldn't it?

This issue was found here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions