Details
Description
Rule S3012 surprisingly do not consider do-while loops... while there is no reason to avoid them. The following code should raise an issue:
do { dst[i] = src[i]; // Noncompliant i++; } while (i < src.length);
Attachments
Issue Links
- is related to
-
SONARJAVA-2971 Rule S3012: Arrays should not be copied using loops
-
- Closed
-
- links to