You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i got a problem running sonar scanner with flutter plugin. I'm getting a NullPointerException in the FlutterTestReportParser
15:32:43.766 ERROR: Error during SonarQube Scanner execution
java.lang.NullPointerException
at fr.insideapp.sonarqube.flutter.tests.FlutterTestReportParser.parse(FlutterTestReportParser.java:58)
at fr.insideapp.sonarqube.flutter.tests.FlutterTestReportParser.parse(FlutterTestReportParser.java:42)
at fr.insideapp.sonarqube.flutter.tests.FlutterTestSensor.execute(FlutterTestSensor.java:57)
The problem is cause by an empty line in the tests.output.
flutter test --machine > tests.output
The output that i am getting has an empty line at the end of the file.
When it gets parsed in the FlutterTestReportParser.parse method on line 46 it throws a NullPointerException because:
String[] lines = input.split(System.getProperty("line.separator")); // also returns the empty lines
for (int i = 0; i < lines.length; i++) {
String line = lines[i];
JSONObject obj = (JSONObject)JSONValue.parse(line); // is null if its an empty line
// Suites
if (obj.containsKey("suite")) { // if obj is null this wil result in a NullPointerException
Could you please add a null check on the "JSONObject obj" in the FlutterTestReportParser.parse?
The text was updated successfully, but these errors were encountered:
Hi, i got a problem running sonar scanner with flutter plugin. I'm getting a NullPointerException in the FlutterTestReportParser
The problem is cause by an empty line in the tests.output.
The output that i am getting has an empty line at the end of the file.
When it gets parsed in the FlutterTestReportParser.parse method on line 46 it throws a NullPointerException because:
Could you please add a null check on the "JSONObject obj" in the FlutterTestReportParser.parse?
The text was updated successfully, but these errors were encountered: