Skip to content

Commit

Permalink
Annotations are incorrectly ordered ahead of visibility in some cases
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <stryker@redhat.com>
  • Loading branch information
Rob Stryker committed Apr 11, 2024
1 parent b706657 commit 0470247
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,13 @@ private List<IExtendedModifier> convert(JCModifiers modifiers, ASTNode parent) {
while(mods.hasNext()) {
res.add(convert(mods.next(), modifiers.pos, parent.getStartPosition() + parent.getLength()));
}
res.sort(new Comparator<IExtendedModifier>() {
@Override
public int compare(IExtendedModifier o1, IExtendedModifier o2) {
ASTNode a1 = (ASTNode)o1;
ASTNode a2 = (ASTNode)o2;
return a1.getStartPosition() - a2.getStartPosition();
}});
return res;
}

Expand Down

0 comments on commit 0470247

Please sign in to comment.