Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 315 Bytes

ClassCastExceptionWithToArray.md

File metadata and controls

8 lines (5 loc) · 315 Bytes

ClassCastExceptionWithToArray

Category: pmd
Rule Key: pmd:ClassCastExceptionWithToArray


if you need to get an array of a class from your Collection, you should pass an array of the desidered class as the parameter of the toArray method. Otherwise you will get a ClassCastException.