Rule Definition
Using two APIs for the same function is considered a problem in terms of maintainability and robustness. It is highly recommended to use only one API, especially when you are using a high-level library/framework or wrapping functionalities that provide additional checks on variables.
Remediation
Use {@code} instead of
Violation Code Sample
/**
* -- ex: looping through List of Map objects --
* <code>
* for (int i = 0; i < list.size(); i++) {
* Map map = (Map)list.get(i);
* System.out.println(map.get("wordID"));
* System.out.println(map.get("word"));
* }
* </code>
*
* @param query - select statement
* @return List of Map objects
*/
Fixed Code Sample
/**
* -- ex: looping through List of Map objects --
* {@code
* for (int i = 0; i < list.size(); i++) {
* Map map = (Map)list.get(i);
* System.out.println(map.get("wordID"));
* System.out.println(map.get("word"));
* }
* }
*
* @param query - select statement
* @return List of Map objects
*/
Reference
https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html#CHDJGIJB
Related Technologies
Technical Criterion
Documentation - Automated Documentation
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.