Skip to content

Commit

Permalink
Slightly change the ordering cancellation check.
Browse files Browse the repository at this point in the history
This main reasoning is to keep its timing consistent with other frontends.

PiperOrigin-RevId: 728854490
  • Loading branch information
gkdn authored and copybara-github committed Feb 20, 2025
1 parent 796775e commit 7128668
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ private Type convertType(
}

private void convertTypeBody(Type type, List<BodyDeclaration> bodyDeclarations) {
problems.abortIfCancelled();
for (BodyDeclaration bodyDeclaration : bodyDeclarations) {
problems.abortIfCancelled();
if (bodyDeclaration instanceof FieldDeclaration) {
FieldDeclaration fieldDeclaration = (FieldDeclaration) bodyDeclaration;
type.addMembers(convert(fieldDeclaration));
Expand Down Expand Up @@ -254,8 +254,8 @@ private void convertTypeBody(Type type, List<BodyDeclaration> bodyDeclarations)
"Unexpected type for BodyDeclaration: %s, in type: %s",
bodyDeclaration.getClass().getName(), type.getDeclaration().getQualifiedSourceName());
}
problems.abortIfCancelled();
}
problems.abortIfCancelled();
}

private Field convert(EnumConstantDeclaration enumConstantDeclaration) {
Expand Down

0 comments on commit 7128668

Please sign in to comment.