Loading src/main/java/appB/AnnotationExamples.java 0 → 100644 +32 −0 Changes for src/main/java/appB/AnnotationExamples.java: 32 added lines, 0 removed lines. Original line number Diff line number Diff line package appB; import org.jetbrains.annotations.NotNull; public class AnnotationExamples { private @NotNull String cannotBeNull = "some value"; void cannotTakeNullParameter(@NotNull String str) { @NotNull String val; System.out.println(str.length()); } @NotNull String cannotReturnNullValue() { return null; } // if you use @Override on a method that is not from Object, this will give a compiler error @Override public String toString() { return "AnnotationExamples{" + "cannotBeNull='" + cannotBeNull + '\'' + '}'; } } @FunctionalInterface interface IntToString { String convert(int value); // uncomment this to see a compiler error // void anotherAbstractMethod(); } src/test/java/appB/TestMeTest.java +8 −0 Changes for src/test/java/appB/TestMeTest.java: 8 added lines, 0 removed lines. Original line number Diff line number Diff line package appB; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; class TestMeTest { Loading @@ -15,4 +16,11 @@ class TestMeTest { // then Assertions.assertEquals(expectedMessage, testMe.getMessage()); } @Test @Disabled("This test isn't finished") void thisTestIsForIgnoring() { Assertions.fail("Fails on purpose"); } } No newline at end of file Loading
src/main/java/appB/AnnotationExamples.java 0 → 100644 +32 −0 Changes for src/main/java/appB/AnnotationExamples.java: 32 added lines, 0 removed lines. Original line number Diff line number Diff line package appB; import org.jetbrains.annotations.NotNull; public class AnnotationExamples { private @NotNull String cannotBeNull = "some value"; void cannotTakeNullParameter(@NotNull String str) { @NotNull String val; System.out.println(str.length()); } @NotNull String cannotReturnNullValue() { return null; } // if you use @Override on a method that is not from Object, this will give a compiler error @Override public String toString() { return "AnnotationExamples{" + "cannotBeNull='" + cannotBeNull + '\'' + '}'; } } @FunctionalInterface interface IntToString { String convert(int value); // uncomment this to see a compiler error // void anotherAbstractMethod(); }
src/test/java/appB/TestMeTest.java +8 −0 Changes for src/test/java/appB/TestMeTest.java: 8 added lines, 0 removed lines. Original line number Diff line number Diff line package appB; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; class TestMeTest { Loading @@ -15,4 +16,11 @@ class TestMeTest { // then Assertions.assertEquals(expectedMessage, testMe.getMessage()); } @Test @Disabled("This test isn't finished") void thisTestIsForIgnoring() { Assertions.fail("Fails on purpose"); } } No newline at end of file