Skip to content

Commit 88b8dd0

Browse files
maksim-grebeniuk-sonarsourcesonartech
authored andcommitted
SONARPY-2758 Make PythonScanner.saveMeasures thread safe (#215)
GitOrigin-RevId: 9f5b80d7edb1247295e5825f1a15f7648b258de0
1 parent d00f0d4 commit 88b8dd0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python-commons/src/main/java/org/sonar/plugins/python/PythonScanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private static NewIssueLocation newLocation(PythonInputFile inputFile, NewIssue
334334
return newLocation;
335335
}
336336

337-
private void saveMeasures(PythonInputFile inputFile, PythonVisitorContext visitorContext) {
337+
private synchronized void saveMeasures(PythonInputFile inputFile, PythonVisitorContext visitorContext) {
338338
FileMetrics fileMetrics = new FileMetrics(visitorContext, isNotebook(inputFile));
339339
FileLinesVisitor fileLinesVisitor = fileMetrics.fileLinesVisitor();
340340

0 commit comments

Comments
 (0)