Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf1a89d

Browse files
Merge pull request#8856 from shivam71/compact_src_file_implicit_class_end_pos_fix
Set end position for implicit class declaration tree part of a compact source file
2 parentsf045559 +b59293f commitaf1a89d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎java/java.sourceui/src/org/netbeans/api/java/source/ui/ElementOpen.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,11 @@ static void fillInTreePositions(CompilationInfo info, Tree forTree, Object[] tar
573573
int[]span =null;
574574
switch(forTree.getKind()) {
575575
caseCLASS:
576+
if ((int)target[1] >=0 && (int)target[2] == -1) {
577+
// Compact Source file (JEP 512) issue implicit class end position not found in code
578+
// see JDK-8364015
579+
target[2] = (int)info.getTrees().getSourcePositions().getEndPosition(cu,cu);
580+
}
576581
caseINTERFACE:
577582
caseENUM:
578583
caseANNOTATION_TYPE:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp