Java 为什么SangARQube考虑INT[]][]不可序列化?

Java 为什么SangARQube考虑INT[]][]不可序列化?,java,sonarqube,serializable,Java,Sonarqube,Serializable,在我的代码中,我有以下行: private int[][][] shapes; 在野外,它生活在一个枚举中: public enum TetrisGamePiece { private int id; private int pieceColour; private int[][][] shapes; // <-- This line is not accepted private TetrisGamePiece(int id, int colour,

在我的代码中,我有以下行:

private int[][][] shapes;
在野外,它生活在一个枚举中:

public enum TetrisGamePiece {
    private int id;
    private int pieceColour;
    private int[][][] shapes; // <-- This line is not accepted

    private TetrisGamePiece(int id, int colour, int[][] shape1, int[][] shape2, int[][] shape3, int[][] shape4) {
        this.id = id;
        this.pieceColour = colour;
        this.shapes = new int[][][]{shape1, shape2, shape3, shape4};
    }
    // ... the rest of the enum ... 
    // i've left out instantiation of objects to save space. 
public enum tetrismgamepiece{
私有int-id;
私人色彩;

private int[][]shapes;//正如@Simon Brandhof的评论中提到的,这确实是所选规则中的一个bug

这个问题是由于检查不认为原语是可序列化的。 票会解决这个问题。
谢谢你的报道。

听起来像是sonarqube中的一个bug。@jtahlborn谢谢:)我怀疑我的理智,因为我的一个小问题,所有的原语和它们的包装器都是可以用java序列化的,它们的数组也是。嘿,曾经出现过。当它看起来太明显时,你有时会想你是否遗漏了什么!这个问题值得留给其他人还是其他人来回答吗它没有价值吗?