Skip to content

Commit

Permalink
Issue #14625: fix inspection violation OptionalGetWithoutIsPresent Ja…
Browse files Browse the repository at this point in the history
…vaParserTest tAHSLCN
  • Loading branch information
MANISH-K-07 authored and nrmancuso committed Apr 23, 2024
1 parent 72cf172 commit d6d4a5d
Showing 1 changed file with 3 additions and 9 deletions.
Expand Up @@ -105,12 +105,6 @@ public void testAppendHiddenBlockCommentNodes() throws Exception {
.isEqualTo(1);
}

/**
* Temporary java doc.
*
* @noinspection OptionalGetWithoutIsPresent
* @noinspectionreason OptionalGetWithoutIsPresent - until issue #14625
*/
@Test
public void testAppendHiddenSingleLineCommentNodes() throws Exception {
final DetailAST root =
Expand All @@ -120,10 +114,10 @@ public void testAppendHiddenSingleLineCommentNodes() throws Exception {
final Optional<DetailAST> singleLineComment = TestUtil.findTokenInAstByPredicate(root,
ast -> ast.getType() == TokenTypes.SINGLE_LINE_COMMENT);
assertWithMessage("Single line comment should be present")
.that(singleLineComment.isPresent())
.isTrue();
.that(singleLineComment.isPresent())
.isTrue();

final DetailAST comment = singleLineComment.get();
final DetailAST comment = singleLineComment.orElseThrow();

assertWithMessage("Unexpected line number")
.that(comment.getLineNo())
Expand Down

0 comments on commit d6d4a5d

Please sign in to comment.