Skip to content

Commit

Permalink
SLVSCODE-955 pass null content for modified files
Browse files Browse the repository at this point in the history
  • Loading branch information
sophio-japharidze-sonarsource committed Dec 4, 2024
1 parent e56ffff commit ccb981c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.sonarsource.sonarlint.ls.file;

import java.net.URI;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import org.apache.commons.lang3.builder.ToStringBuilder;

Expand All @@ -33,7 +34,7 @@ public class VersionedOpenFile {
private final int version;
private final String content;

public VersionedOpenFile(URI uri, String languageId, int version, String content) {
public VersionedOpenFile(URI uri, String languageId, int version, @Nullable String content) {
this.uri = uri;
this.languageId = languageId;
this.version = version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void notifyBackend(List<FileEvent> changes) {
if (event.getType() == FileChangeType.Deleted) {
deletedFileUris.add(fileUri);
} else {
var clientFileDto = getClientFileDto(new VersionedOpenFile(fileUri, "", 0, ""));
var clientFileDto = getClientFileDto(new VersionedOpenFile(fileUri, "", 0, null));
if (event.getType() == FileChangeType.Created) {
addedFiles.add(clientFileDto);
} else {
Expand Down

0 comments on commit ccb981c

Please sign in to comment.