I am working on a Spring boot application. Recently I have updated the dependency in pom.xml as follows:
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.4.7</version>
</dependency>
Post this, I am getting Comparison method violates its general contract!
exception while doing a rest call as follows:
return restTemplate
.postForEntity(uri, email, String.class).getBody();
Associated API end point is as follows:
@GetMapping("/student/{email}")
public ResponseEntity<Student> getStudent(@PathVariable String email) {
Optional<Student> student = studentService.findOne(email);
return ResponseWrapper.wrap(student);
}
I don't understand, how to fix this issue. Could anyone please help here? Thanks.