|
| 1 | +<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_linter_check"> |
| 2 | + <scan_linter_check action="DELETE"> |
| 3 | + <active>true</active> |
| 4 | + <category>manageability</category> |
| 5 | + <description>In general, you should use the array literal notation when possible. It is easier to read, it gives the compiler a chance to optimize your code, and it's mostly faster too.</description> |
| 6 | + <documentation_url>https://www.java67.com/2014/08/difference-between-string-literal-and-new-String-object-Java.html</documentation_url> |
| 7 | + <finding_type>scan_finding</finding_type> |
| 8 | + <name>Don't use new Array()</name> |
| 9 | + <priority>4</priority> |
| 10 | + <resolution_details>Use [] instead of new Array().</resolution_details> |
| 11 | + <run_condition/> |
| 12 | + <score_max>100</score_max> |
| 13 | + <score_min>0</score_min> |
| 14 | + <score_scale>1</score_scale> |
| 15 | + <script><![CDATA[(function (engine) { |
| 16 | +
|
| 17 | + // Perform Linter Check |
| 18 | + engine.rootNode.visit(function(node) { |
| 19 | + if(node.getTypeName() === "NAME" && node.getNameIdentifier() === "Array" && node.getParent().getTypeName() === "NEW") { |
| 20 | + // Create scan finding |
| 21 | + engine.finding.incrementWithNode(node); |
| 22 | + } |
| 23 | + }); |
| 24 | +
|
| 25 | +})(engine);]]></script> |
| 26 | + <short_description>Don't use new Array()</short_description> |
| 27 | + <sys_class_name>scan_linter_check</sys_class_name> |
| 28 | + <sys_created_by>admin</sys_created_by> |
| 29 | + <sys_created_on>2022-10-08 17:05:24</sys_created_on> |
| 30 | + <sys_id>c2db61672f561110a1803e0ef699b64b</sys_id> |
| 31 | + <sys_mod_count>0</sys_mod_count> |
| 32 | + <sys_name>Don't use new Array()</sys_name> |
| 33 | + <sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package> |
| 34 | + <sys_policy/> |
| 35 | + <sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope> |
| 36 | + <sys_update_name>scan_linter_check_c2db61672f561110a1803e0ef699b64b</sys_update_name> |
| 37 | + <sys_updated_by>admin</sys_updated_by> |
| 38 | + <sys_updated_on>2022-10-08 17:05:24</sys_updated_on> |
| 39 | + </scan_linter_check> |
| 40 | +<sys_update_version action="INSERT_OR_UPDATE"> |
| 41 | + <action>DELETE</action> |
| 42 | + <application display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</application> |
| 43 | + <file_path/> |
| 44 | + <instance_id>3b3779331b2d3d101024eb9b2d4bcb61</instance_id> |
| 45 | + <instance_name>dev181379</instance_name> |
| 46 | + <name>scan_linter_check_c2db61672f561110a1803e0ef699b64b</name> |
| 47 | + <payload><?xml version="1.0" encoding="UTF-8"?><record_update table="scan_linter_check"> |
| 48 | + <scan_linter_check action="INSERT_OR_UPDATE"> |
| 49 | + <active>true</active> |
| 50 | + <category>manageability</category> |
| 51 | + <description>In general, you should use the array literal notation when possible. It is easier to read, it gives the compiler a chance to optimize your code, and it's mostly faster too.</description> |
| 52 | + <documentation_url>https://www.java67.com/2014/08/difference-between-string-literal-and-new-String-object-Java.html</documentation_url> |
| 53 | + <finding_type>scan_finding</finding_type> |
| 54 | + <name>Don't use new Array()</name> |
| 55 | + <priority>4</priority> |
| 56 | + <resolution_details>Use [] instead of new Array().</resolution_details> |
| 57 | + <run_condition/> |
| 58 | + <score_max>100</score_max> |
| 59 | + <score_min>0</score_min> |
| 60 | + <score_scale>1</score_scale> |
| 61 | + <script><![CDATA[(function (engine) { |
| 62 | + |
| 63 | + // Perform Linter Check |
| 64 | + engine.rootNode.visit(function(node) { |
| 65 | + if(node.getTypeName() === "NAME" && node.getNameIdentifier() === "Array" && node.getParent().getTypeName() === "NEW") { |
| 66 | + // Create scan finding |
| 67 | + engine.finding.incrementWithNode(node); |
| 68 | + } |
| 69 | + }); |
| 70 | + |
| 71 | +})(engine);]]></script> |
| 72 | + <short_description>Don't use new Array()</short_description> |
| 73 | + <sys_class_name>scan_linter_check</sys_class_name> |
| 74 | + <sys_created_by>admin</sys_created_by> |
| 75 | + <sys_created_on>2022-10-08 17:05:24</sys_created_on> |
| 76 | + <sys_id>c2db61672f561110a1803e0ef699b64b</sys_id> |
| 77 | + <sys_mod_count>0</sys_mod_count> |
| 78 | + <sys_name>Don't use new Array()</sys_name> |
| 79 | + <sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package> |
| 80 | + <sys_policy/> |
| 81 | + <sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope> |
| 82 | + <sys_update_name>scan_linter_check_c2db61672f561110a1803e0ef699b64b</sys_update_name> |
| 83 | + <sys_updated_by>admin</sys_updated_by> |
| 84 | + <sys_updated_on>2022-10-08 17:05:24</sys_updated_on> |
| 85 | + </scan_linter_check> |
| 86 | +</record_update></payload> |
| 87 | + <payload_hash>-1288508107</payload_hash> |
| 88 | + <record_name>Don't use new Array()</record_name> |
| 89 | + <reverted_from/> |
| 90 | + <source>a33d22c047397110243ff19f016d43fa</source> |
| 91 | + <source_table>sys_upgrade_history</source_table> |
| 92 | + <state>current</state> |
| 93 | + <sys_created_by>admin</sys_created_by> |
| 94 | + <sys_created_on>2023-10-05 20:43:22</sys_created_on> |
| 95 | + <sys_id>184d62c047397110243ff19f016d43a4</sys_id> |
| 96 | + <sys_mod_count>0</sys_mod_count> |
| 97 | + <sys_recorded_at>18b0194ac770000001</sys_recorded_at> |
| 98 | + <sys_updated_by>admin</sys_updated_by> |
| 99 | + <sys_updated_on>2023-10-05 20:43:22</sys_updated_on> |
| 100 | + <type>Linter Check</type> |
| 101 | + <update_guid>d44d62c0e739711006b12536250952a4</update_guid> |
| 102 | + <update_guid_history>d44d62c0e739711006b12536250952a4:-1288508107</update_guid_history> |
| 103 | + </sys_update_version> |
| 104 | + <sys_metadata_delete action="INSERT_OR_UPDATE"> |
| 105 | + <sys_audit_delete display_value="Don't use new Array()">4976874c47797110243ff19f016d43ef</sys_audit_delete> |
| 106 | + <sys_class_name>sys_metadata_delete</sys_class_name> |
| 107 | + <sys_created_by>smartcarleen</sys_created_by> |
| 108 | + <sys_created_on>2023-10-05 22:33:28</sys_created_on> |
| 109 | + <sys_db_object display_value="" name="scan_linter_check">scan_linter_check</sys_db_object> |
| 110 | + <sys_id>0aa8c028e2c148aa908c575e038de241</sys_id> |
| 111 | + <sys_metadata>c2db61672f561110a1803e0ef699b64b</sys_metadata> |
| 112 | + <sys_mod_count>0</sys_mod_count> |
| 113 | + <sys_name>Don't use new Array()</sys_name> |
| 114 | + <sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package> |
| 115 | + <sys_parent/> |
| 116 | + <sys_policy/> |
| 117 | + <sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope> |
| 118 | + <sys_scope_delete display_value="">30a78b9b9290467a96959a65d2b2d304</sys_scope_delete> |
| 119 | + <sys_update_name>scan_linter_check_c2db61672f561110a1803e0ef699b64b</sys_update_name> |
| 120 | + <sys_update_version display_value="scan_linter_check_c2db61672f561110a1803e0ef699b64b">184d62c047397110243ff19f016d43a4</sys_update_version> |
| 121 | + <sys_updated_by>smartcarleen</sys_updated_by> |
| 122 | + <sys_updated_on>2023-10-05 22:33:28</sys_updated_on> |
| 123 | + </sys_metadata_delete> |
| 124 | +</record_update> |
0 commit comments