spring-cloud-commons icon indicating copy to clipboard operation
spring-cloud-commons copied to clipboard

Code modification based on CodeGuru.

Open XinyuLiu5566 opened this issue 4 years ago • 2 comments

  • Some code uses '%s' to format int: 'size' expression. Use %d, not %s, for integers. This ensures locale-sensitive formatting.
  • some lines of code lack validation when processing input data.
  • Iterating over map.keySet() and calling map.get(Key) to get the values within the loop is inefficient. Iterate over map.entrySet() and access the values using entry.getValue() to avoid potential performance penalty due to lookup.

XinyuLiu5566 avatar Oct 11 '21 19:10 XinyuLiu5566

@XinyuLiu5566 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla avatar Oct 11 '21 19:10 pivotal-cla

@XinyuLiu5566 Thank you for signing the Contributor License Agreement!

pivotal-cla avatar Nov 15 '21 22:11 pivotal-cla