Skip to content

Commit

Permalink
Fix testDeleteField4
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 Mar 11, 2024
1 parent 999ab3e commit c9c003b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,10 @@ private FieldDeclaration convertFieldDeclaration(JCVariableDecl javac, ASTNode p
// if (singleDecl) {
VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
commonSettings(fragment, javac);
// start=34, len=17
int fragmentEnd = javac.getEndPosition(this.javacCompilationUnit.endPositions);
int fragmentLength = javac.getName().toString().length();
int fragmentStart = fragmentEnd - fragmentLength - 1;
int fragmentStart = javac.pos;
int fragmentLength = fragmentEnd - fragmentStart - 1;
fragment.setSourceRange(fragmentStart, Math.max(0, fragmentLength));

if (convert(javac.getName()) instanceof SimpleName simpleName) {
Expand Down

0 comments on commit c9c003b

Please sign in to comment.