[Java. Code Formatting] Rewrite the way of detection type annotation in JavaFormatterUtil

IDEA-353192

GitOrigin-RevId: 34e375e4e1e059be03aad12c2839911b8315ed06
This commit is contained in:
Georgii Ustinov
2024-06-03 10:16:10 +03:00
committed by intellij-monorepo-bot
parent c7a93d5462
commit a4d5e41d7f
23 changed files with 336 additions and 51 deletions

View File

@@ -13,8 +13,7 @@ class Y extends X{
}
}
class Z extends Y {
@NotNull
String dontAnnotateBase<caret>() {// trigger quick fix for inspection here
@NotNull String dontAnnotateBase() {// trigger quick fix for inspection here
return "Z";
}
}

View File

@@ -9,15 +9,13 @@ abstract class P2 {
}
class PPP extends P2 {
@NotNull
String foo(P p) {
@NotNull String foo(P p) {
return super.foo(p);
}
}
class PPP2 extends P2 {
@NotNull
String foo(P p) {
@NotNull String foo(P p) {
return super.foo(p);
}
}

View File

@@ -9,8 +9,7 @@ import org.jetbrains.annotations.*;
}
}
class XC extends XEM {
@NotNull
String f() {
@NotNull String f() {
return "";
}
}

View File

@@ -6,8 +6,7 @@ public interface MyTestClass {
}
public class MyRealTestClass implements MyTestClass {
@NotNull
String implementMe(String arg) {
@NotNull String implementMe(String arg) {
}
}