mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
more java tests moved to community
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// "Annotate method as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
@NotNull
|
||||
String foo() {
|
||||
return "X";
|
||||
}
|
||||
}
|
||||
class Y extends X{
|
||||
String foo() {
|
||||
return "Y";
|
||||
}
|
||||
}
|
||||
class Z extends Y {
|
||||
String foo<caret>() { // trigger quick fix for inspection here
|
||||
return "Z";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// "Annotate method as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
@NotNull
|
||||
String annotateBase() {
|
||||
return "X";
|
||||
}
|
||||
}
|
||||
class Y extends X{
|
||||
@NotNull
|
||||
String annotateBase() {
|
||||
return "Y";
|
||||
}
|
||||
}
|
||||
class Z extends Y {
|
||||
@NotNull
|
||||
String annotateBase<caret>() { // trigger quick fix for inspection here
|
||||
return "Z";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
class Foo {
|
||||
<caret>@Nullable
|
||||
String foo(){return "";}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// "Annotate method as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
@NotNull
|
||||
String dontAnnotateBase() {
|
||||
return "X";
|
||||
}
|
||||
}
|
||||
class Y extends X{
|
||||
String dontAnnotateBase() {
|
||||
return "Y";
|
||||
}
|
||||
}
|
||||
class Z extends Y {
|
||||
@NotNull
|
||||
String dontAnnotateBase<caret>() { // trigger quick fix for inspection here
|
||||
return "Z";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// "Annotate overridden methods as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
abstract class P2 {
|
||||
@NotNull<caret>
|
||||
String foo(@NotNull P p) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class PPP extends P2 {
|
||||
@NotNull
|
||||
String foo(P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
class PPP2 extends P2 {
|
||||
|
||||
@NotNull
|
||||
String foo(P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// "Annotate overridden methods parameters as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
abstract class P2 {
|
||||
@NotNull
|
||||
String foo(@NotNull<caret> P p) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class PPP extends P2 {
|
||||
String foo(@NotNull P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
class PPP2 extends P2 {
|
||||
|
||||
String foo(@NotNull P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
class Foo {
|
||||
<caret>int foo(){return 0;}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// "Annotate overridden methods as @NotNull" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public class XEM {
|
||||
<caret>@NotNull
|
||||
String f(){
|
||||
return "";
|
||||
}
|
||||
}
|
||||
class XC extends XEM {
|
||||
@NotNull
|
||||
String f() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// "Annotate method as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
@NotNull
|
||||
String foo() {
|
||||
return "X";
|
||||
}
|
||||
}
|
||||
class Y extends X{
|
||||
String foo() {
|
||||
return "Y";
|
||||
}
|
||||
}
|
||||
class Z extends Y {
|
||||
String foo<caret>() { // trigger quick fix for inspection here
|
||||
return "Z";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// "Annotate method as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
@NotNull
|
||||
String annotateBase() {
|
||||
return "X";
|
||||
}
|
||||
}
|
||||
class Y extends X{
|
||||
String annotateBase() {
|
||||
return "Y";
|
||||
}
|
||||
}
|
||||
class Z extends Y {
|
||||
String annotateBase<caret>() { // trigger quick fix for inspection here
|
||||
return "Z";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
class Foo {
|
||||
<caret>@NotNull @Nullable
|
||||
String foo(){return "";}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// "Annotate method as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
@NotNull
|
||||
String dontAnnotateBase() {
|
||||
return "X";
|
||||
}
|
||||
}
|
||||
class Y extends X{
|
||||
String dontAnnotateBase() {
|
||||
return "Y";
|
||||
}
|
||||
}
|
||||
class Z extends Y {
|
||||
String dontAnnotateBase<caret>() { // trigger quick fix for inspection here
|
||||
return "Z";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// "Annotate overridden methods as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
abstract class P2 {
|
||||
@NotNull<caret>
|
||||
String foo(@NotNull P p) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class PPP extends P2 {
|
||||
String foo(P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
class PPP2 extends P2 {
|
||||
|
||||
String foo(P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// "Annotate overridden methods parameters as @NotNull" "true"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
abstract class P2 {
|
||||
@NotNull
|
||||
String foo(@NotNull<caret> P p) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class PPP extends P2 {
|
||||
String foo(P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
class PPP2 extends P2 {
|
||||
|
||||
String foo(P p) {
|
||||
return super.foo(p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
class Foo {
|
||||
<caret>@NotNull
|
||||
int foo(){return 0;}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// "Annotate overridden methods as @NotNull" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public class XEM {
|
||||
<caret>@NotNull
|
||||
String f(){
|
||||
return "";
|
||||
}
|
||||
}
|
||||
class XC extends XEM {
|
||||
@Nullable
|
||||
String f() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user