mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
[Java. Code Formatting] Fix type annotations wrapping in RecordCanBeClassInspectionTest
IDEA-342196 GitOrigin-RevId: 8f1c8e7fbd72f93b115b6c267cb549bd703bf8d0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
987c387696
commit
6ca3373c89
@@ -511,7 +511,10 @@ public final class JavaFormatterUtil {
|
||||
if (current.getElementType() != JavaElementType.ANNOTATION || parent.getElementType() != JavaElementType.MODIFIER_LIST) return false;
|
||||
while (true) {
|
||||
current = FormatterUtil.getPreviousNonWhitespaceSibling(current);
|
||||
if (current instanceof PsiKeyword) return true;
|
||||
if (current instanceof PsiKeyword) {
|
||||
ASTNode grandParent = parent.getTreeParent();
|
||||
return grandParent != null && grandParent.getElementType() == JavaElementType.METHOD;
|
||||
}
|
||||
else if (current == null || current.getElementType() != JavaElementType.ANNOTATION) break;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -54,8 +54,7 @@ final class R implements F3 {
|
||||
return f1;
|
||||
}
|
||||
|
||||
public @TypeUse(2)
|
||||
@TypeUse2(2) int f2() {
|
||||
public @TypeUse(2) @TypeUse2(2) int f2() {
|
||||
return f2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user