Skip to content

Commit 1e53285

Browse files
authored
Merge pull request #8683 from apache/delivery
Sync delivery to release270 for 27-rc2
2 parents 1c2ffa1 + a8cbebf commit 1e53285

File tree

19 files changed

+4204
-43
lines changed

19 files changed

+4204
-43
lines changed

java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,9 @@ private void insideClass(Env env) throws IOException {
762762
}
763763
String headerText = controller.getText().substring(startPos, offset);
764764
int idx = headerText.indexOf('{'); //NOI18N
765-
if (idx >= 0) {
765+
//see JDK-8364015, unclear how reliable this will be:
766+
boolean isImplicitlyDeclaredClass = sourcePositions.getEndPosition(root, cls) == (-1);
767+
if (idx >= 0 || isImplicitlyDeclaredClass) {
766768
addKeywordsForClassBody(env);
767769
addClassTypes(env, null);
768770
addElementCreators(env);

0 commit comments

Comments
 (0)