Given a multi-dimensional array, the extractor doesn't seem to provide enough information about nested sub-arrays. For example: ```java 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: ```ql 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](https://github.com/github/codeql/pull/6357#discussion_r688717982).
Activity
tausbn commentedon Aug 26, 2021
Thank you for reporting this! I will forward it to the Java team.
smowton commentedon Sep 10, 2021
Fixed in the next release: for the best backward compatibility, the representation will be somewhat irregular:
{ { 1, 2 } })byte[] bs = new byte[10])new byte[10]ArrayCreationExprArrayCreationExprnew byte[] { 1 }ArrayInitArrayCreationExpr(with agetInit){ 1, 2, 3 }ArrayInitArrayCreationExpr(with agetInit)