Why are public static final array a security hole?

后端 未结 8 1684
盖世英雄少女心
盖世英雄少女心 2020-12-13 13:21

Effective java says:

// Potential security hole!

static public final Thing[] VALUES = { ... };

Can somebody tell me what is t

8条回答
  •  渐次进展
    2020-12-13 13:45

    In this declaration, a client can modify Thing[0], Thing[1], etc (i.e. elements in the array).

提交回复
热议问题