Skip to content

Commit

Permalink
Fix AIOOBE in diagnostic adjustment
Browse files Browse the repository at this point in the history
Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 authored and mickaelistria committed Jun 19, 2024
1 parent 3f96312 commit 1fcbdee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private static org.eclipse.jface.text.Position getDiagnosticPosition(JCDiagnosti
private static org.eclipse.jface.text.Position getDiagnosticPosition(JCDiagnostic jcDiagnostic, JCClassDecl jcClassDecl) {
int startPosition = (int) jcDiagnostic.getPosition();
if (startPosition != Position.NOPOS &&
!(jcClassDecl.getMembers().isEmpty() && jcClassDecl.getStartPosition() == jcClassDecl.getMembers().get(0).getStartPosition())) {
!jcClassDecl.getMembers().isEmpty() && jcClassDecl.getStartPosition() != jcClassDecl.getMembers().get(0).getStartPosition()) {
try {
String name = jcClassDecl.getSimpleName().toString();
return getDiagnosticPosition(name, startPosition, jcDiagnostic);
Expand Down

0 comments on commit 1fcbdee

Please sign in to comment.