From 8d183679cd210c5a44503461711a6265603831d9 Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Fri, 10 May 2024 13:13:34 -0400 Subject: [PATCH] Fix for test0314 - String v[] has off-by-one error Signed-off-by: Rob Stryker --- .../src/org/eclipse/jdt/core/dom/JavacConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index 0363cea156f..d565bcc638d 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -1410,7 +1410,7 @@ private int countDimensionsAfterPosition(JCArrayTypeTree tree, int pos) { int ret = 0; JCTree elem = tree; while (elem != null && elem.hasTag(TYPEARRAY)) { - if( elem.pos > pos) + if( elem.pos >= pos) ret++; elem = ((JCArrayTypeTree)elem).elemtype; }