We use analytics and advertising cookies to understand how the site is used and whether our ads on Facebook, Instagram and Microsoft search (Bing) work. They are set only if you accept. See our Privacy Policy for details.
Home / Review the AI's PR / Java
The ask: “Make chargeCustomer retry up to 3 times with exponential backoff when the payment API call fails.”
Context: POST /charges on a payment provider; the request has no idempotency key.
Click any added line you would block in review and say why. This change has 2 planted defects.
| 30 | public ChargeResult chargeCustomer(ChargeRequest req) throws IOException { | |
| - | return http.post("/charges", req, ChargeResult.class); | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | } |