Back to Intellij Community

PublicStaticArrayField

java/java-impl/resources/inspectionDescriptions/PublicStaticArrayField.html

2025.3-rc-2299 B
Original Source

Reports public static array fields.

Such fields are often used to store arrays of constant values. Still, they represent a security hazard, as their contents may be modified, even if the field is declared final.

Example:

public static String[] allowedPasswords = {"foo", "bar"};