Security_Code_Guidelines

urity_Code_Guidelines">

Security Code Guidelines

  • MethodReturnsInternalArray: Exposing internal arrays directly allows the user to modify some code that could be critical. It is safer to return a copy of the array.
  • ArrayIsStoredDirectly: Constructors and methods receiving arrays should clone objects and store the copy. This prevents that future changes from the user affect the internal functionality.