Inspectopedia
 
2024.3

Suspicious 'System.arraycopy()' call

Warning
New
Last modified: 03 December 2024

Reports suspicious calls to System.arraycopy().

Such calls are suspicious when:

  • the source or destination is not of an array type

  • the source and destination are of different types

  • the copied chunk length is greater than src.length - srcPos

  • the copied chunk length is greater than dest.length - destPos

  • the ranges always intersect when the source and destination are the same array

Example: