Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix class cast exception in RequestPrinter with byte[] body (#1491)
* Reproduce class cast error in request printing with byte[] body Only happens if shouldPrettyPrint is false, otherwise the groovy code handles non-String bodies more gracefully. Exception is: java.lang.ClassCastException: class [B cannot be cast to class java.lang.String ([B and java.lang.String are in module java.base of loader 'bootstrap') at io.restassured.module.mockmvc.RequestLoggingTest.can_supply_byte_array_as_body_for_post(RequestLoggingTest.java:161) * Fix class cast error in request printing with byte[] body Only happens if shouldPrettyPrint is false, otherwise the groovy code handles non-String bodies more gracefully. The test only checks if the body is [B@, as the hash of the object changes on every test run. Exception is: java.lang.ClassCastException: class [B cannot be cast to class java.lang.String ([B and java.lang.String are in module java.base of loader 'bootstrap') at io.restassured.module.mockmvc.RequestLoggingTest.can_supply_byte_array_as_body_for_post(RequestLoggingTest.java:161)
- Loading branch information