[M] Remove variable name tsc -> cve.

This commit is contained in:
Vanilla
2021-01-18 10:20:51 +08:00
parent eb1e549b09
commit 9f368f49e2
@@ -15,8 +15,8 @@ public class RegistryExceptionHandler {
@ExceptionHandler(ConstraintViolationException.class) @ExceptionHandler(ConstraintViolationException.class)
// ConstraintViolationException will be wrapped to TransactionSystemException! // ConstraintViolationException will be wrapped to TransactionSystemException!
// https://stackoverflow.com/questions/45070642/springboot-doesnt-handle-org-hibernate-exception-constraintviolationexception // https://stackoverflow.com/questions/45070642/springboot-doesnt-handle-org-hibernate-exception-constraintviolationexception
private ResponseEntity<List<String>> handleConstraintViolationException(ConstraintViolationException tse) { private ResponseEntity<List<String>> handleConstraintViolationException(ConstraintViolationException cve) {
List<String> errorMessages = tse.getConstraintViolations().stream() List<String> errorMessages = cve.getConstraintViolations().stream()
.map(ConstraintViolation::getMessage).sorted() .map(ConstraintViolation::getMessage).sorted()
.collect(Collectors.toList()); .collect(Collectors.toList());