fix(mci): Fix ClassCastException in GlowMciComponent mock by instantiating resBodyClass
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 3m19s
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 3m19s
This commit is contained in:
@@ -11,8 +11,18 @@ public class GlowMciComponent<S, R> {
|
||||
|
||||
public Transfer<R> sync(Transfer<S> request) {
|
||||
// 실제 Glow HTTP 통신 (GlowHttpHeaderUtil, HttpClient 등) 수행 시뮬레이션
|
||||
Object responseBody = new Object();
|
||||
if (request != null && request.getResBodyClass() != null) {
|
||||
try {
|
||||
responseBody = request.getResBodyClass().getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
// Ignore and fallback to Object
|
||||
}
|
||||
}
|
||||
|
||||
return (Transfer<R>) Transfer.builder()
|
||||
.body(new Object())
|
||||
.header(request != null ? request.getHeader() : null)
|
||||
.body(responseBody)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user