Skip to content

Commit

Permalink
refact: remove unused exception from throws declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed May 17, 2024
1 parent 8d72ffd commit d34b734
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void testHighlight() throws CoreException {
@Test
public void testCheckIfOtherAnnotationsRemains() throws CoreException {
checkGenericEditorVersion();

MockLanguageServer.INSTANCE.setDocumentHighlights(Map.ofEntries( //
Map.entry(new Position(0, 1), List.of( //
new DocumentHighlight(new Range(new Position(0, 2), new Position(0, 6)), DocumentHighlightKind.Read)
Expand Down Expand Up @@ -107,12 +107,12 @@ public void testCheckIfOtherAnnotationsRemains() throws CoreException {
}

@Test
public void testHighlightsInMultipleViewersForOneSource() throws CoreException, InterruptedException {
public void testHighlightsInMultipleViewersForOneSource() throws CoreException {
checkGenericEditorVersion();

// Create a test file with two sets of highlights
final IFile testFile = TestUtils.createUniqueTestFile(project, "ONE\nTWO");

MockLanguageServer.INSTANCE.setDocumentHighlights(Map.ofEntries( //
Map.entry(new Position(0, 1), List.of( //
new DocumentHighlight(new Range(new Position(0, 0), new Position(0, 3)), DocumentHighlightKind.Write)
Expand All @@ -135,7 +135,7 @@ public void testHighlightsInMultipleViewersForOneSource() throws CoreException,

// Split the view in the active editor
List<IEditorReference> editorReferences = TestUtils.splitActiveEditor();

// Keep track of the newly opened editor, so we can close it later
ISourceViewer viewer2 = null;
IEditorReference editorToClose = null;
Expand All @@ -148,7 +148,7 @@ public void testHighlightsInMultipleViewersForOneSource() throws CoreException,
}
}
Assert.assertNotNull(viewer2);

final var annotationModel2 = viewer2.getAnnotationModel();

// Set the caret offset to activate the second set of highlights
Expand Down Expand Up @@ -197,7 +197,7 @@ private void assertAnnotationExists(IAnnotationModel annotationModel, String ann
" length=" + posLen + "}. Annotations found: " + annotations);
}
}

private void assertAnnotationDoesNotExist(IAnnotationModel annotationModel, String annotationType, int posOffset, int posLen) {
final var hasAnnotation = new boolean[] { false };
final var annotations = new ArrayList<String>();
Expand Down

0 comments on commit d34b734

Please sign in to comment.