Skip to content

Commit

Permalink
fix: Fix CI compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
rvost committed Apr 14, 2024
1 parent 606483c commit 0b8884d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ protected Object executeCommand(DOMDocument document, ExecuteCommandParams param
}
var edits = new ArrayList<Either<TextDocumentEdit, ResourceOperation>>();

var actualStartOffset = selectedNodes.getFirst().getStart();
var actualEndOffset = selectedNodes.getLast().getEnd();
var actualStartOffset = selectedNodes.get(0).getStart();
var actualEndOffset = selectedNodes.get(selectedNodes.size() - 1).getEnd();

var text = document.getTextDocument().getText().substring(actualStartOffset, actualEndOffset);
var targetEdit = computeTargetEdit(targetDocument, text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void doDiagnostics(DOMDocument domDocument, List<Diagnostic> list, XMLVal
}

private void validateCfgEnvironment(DOMDocument document, List<Diagnostic> diagnostics) {
var territoriesNode = document.getDocumentElement().getChildren().getFirst();
var territoriesNode = document.getDocumentElement().getChildren().get(0);
var fileNodes = territoriesNode.getChildren().stream()
.filter(n -> CfgEnvironmentModel.FILE_TAG.equals(n.getNodeName()))
.toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void validate(DOMDocument document, List<Diagnostic> diagnostics, Cancel
var limitsDefinitions = missionService.getLimitsDefinitions();
var userLimitDefinitions = missionService.getUserLimitsDefinitions();

var defaultsNode = document.getDocumentElement().getChildren().getFirst();
var defaultsNode = document.getDocumentElement().getChildren().get(0);
defaultsNode.getChildren().stream()
.filter(n -> MapGroupProtoModel.DEFAULT_TAG.equals(n.getNodeName()))
.map(n -> n.getAttributeNode(MapGroupProtoModel.DE_ATTRIBUTE))
Expand Down

0 comments on commit 0b8884d

Please sign in to comment.