Skip to content

Fix for NPE when flushBuffer is called before getWriter#22

Open
insideaem wants to merge 2 commits into
apache:masterfrom
insideaem:patch-1
Open

Fix for NPE when flushBuffer is called before getWriter#22
insideaem wants to merge 2 commits into
apache:masterfrom
insideaem:patch-1

Conversation

@insideaem

Copy link
Copy Markdown

A NPE is thrown when flushBuffer is called before getWriter.

@insideaem

Copy link
Copy Markdown
Author

@rombert Could you please have a look why the build is failing? And please also review the PR?

@rombert

rombert commented Jun 8, 2023

Copy link
Copy Markdown
Contributor

@insideaem. First of all , thanks for the PR! I'm not the best person to review this but will reach out to the people who know more. I suspect they'll ask you to create a SLING jira issue with steps to reproduce, so it would be best to do that ahead of time :-) https://issues.apache.org/jira/browse/SLING

Your PR fails because we recently updated our CI to test more combinations and we haven't yet adapted all modules. I'll try to fix the scripting core build in the meantime.

@rombert rombert requested review from karlpauls and raducotescu June 8, 2023 12:54
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@sonarqubecloud

Copy link
Copy Markdown

2 similar comments
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2025

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@cziegeler

Copy link
Copy Markdown
Contributor

@insideaem Makes sense to prevent the NPE, please create a SLING issue first. As the code has evolved since this PR was created, please also address this for CaptureJakartaResponseWrapper.java
A test covering this case would be great

@sonarqubecloud

sonarqubecloud Bot commented Jun 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants