Skip to content

Commit

Permalink
improve code len
Browse files Browse the repository at this point in the history
  • Loading branch information
tejaskriya committed Feb 6, 2025
1 parent 252936d commit 61d476b
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,11 @@ private String constructCommandAuditMap(List<SCMCommandProto> cmds) {
} else {
auditMap.append(cmd);
}
auditMap.append(" , ");
auditMap.append(", ");
}
int len = auditMap.toString().length();
if (len > 3) {
auditMap.deleteCharAt(len - 1);
auditMap.deleteCharAt(len - 2);
auditMap.deleteCharAt(len - 3);
int len = auditMap.length();
if (len > 2) {
auditMap.delete(len - 2, len - 1);
}
auditMap.append(']');
return auditMap.toString();
Expand Down

0 comments on commit 61d476b

Please sign in to comment.