Skip to content

Commit

Permalink
[Records] Unhelpful warning "Empty block should be documented" for
Browse files Browse the repository at this point in the history
records without components

* Fixes eclipse-jdt#3316
  • Loading branch information
srikanth-sankaran committed Nov 26, 2024
1 parent 1bea890 commit 94f11ac
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1372,9 +1372,9 @@ public void resolve() {
}
}

if ((this.bits & ASTNode.UndocumentedEmptyBlock) != 0 && this.nRecordComponents == 0) {
this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, this.bodyEnd);
}
if (!sourceType.isRecord() && (this.bits & ASTNode.UndocumentedEmptyBlock) != 0)
this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart - 1, this.bodyEnd);

boolean needSerialVersion =
this.scope.compilerOptions().getSeverity(CompilerOptions.MissingSerialVersion) != ProblemSeverities.Ignore
&& sourceType.isClass()
Expand Down
Loading

0 comments on commit 94f11ac

Please sign in to comment.