Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1192 check null before use this.content #1193

Conversation

npeters
Copy link
Contributor

@npeters npeters commented Oct 19, 2024

test + code.

This code fix the NPE

@npeters
Copy link
Contributor Author

npeters commented Oct 19, 2024

this PR is linked to aws/serverless-java-container#1085.

when both will be merge.
it should work fine

@PostMapping(path = "/echo")
    public ResponseEntity<String> get(@RequestBody String body,
                                      @RequestHeader Map<String, String> headers,
                                      HttpServletRequest req) {


        return ResponseEntity.ofNullable(body);
    }

@olegz
Copy link
Contributor

olegz commented Oct 21, 2024

Thank you for your contribution, but. . .
Please run the build, there are checkstyle violations related to code formatting

@npeters npeters force-pushed the fix/#1192-NPE-ServerlessHttpServletRequest-content branch from 39bc996 to 991e857 Compare October 21, 2024 21:46
@npeters npeters force-pushed the fix/#1192-NPE-ServerlessHttpServletRequest-content branch from 991e857 to 679f8a0 Compare October 21, 2024 21:49
@npeters
Copy link
Contributor Author

npeters commented Oct 21, 2024

ok, I followed the contribution guide https://github.com/spring-cloud/spring-cloud-build/tree/main
the commit is much cleaner ;)

@olegz olegz added this to the 4.2 milestone Oct 24, 2024
@olegz olegz closed this in e795188 Oct 24, 2024
olegz pushed a commit that referenced this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants