Jspecify: Rename codeanalysis annotations to jspecify ones
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
@codeanalysis.experimental.annotations.DefaultNotNull
|
||||
public class A {
|
||||
public void foo(String x) {}
|
||||
|
||||
@codeanalysis.experimental.annotations.Nullable
|
||||
public String bar() { return null; }
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
compiler/testData/cli/jvm/codeanalysisUsage.kt:2:11: warning: type mismatch: inferred type is Nothing? but String was expected
|
||||
a.foo(null)
|
||||
^
|
||||
compiler/testData/cli/jvm/codeanalysisUsage.kt:3:5: warning: unsafe use of a nullable receiver of type String?
|
||||
a.bar().hashCode()
|
||||
^
|
||||
OK
|
||||
@@ -1,6 +0,0 @@
|
||||
-Xcodeanalysis-annotations=ignore
|
||||
$TESTDATA_DIR$/codeanalysisUsage.kt
|
||||
$TESTDATA_DIR$/codeanalysis
|
||||
$FOREIGN_ANNOTATIONS_DIR$
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -1,6 +0,0 @@
|
||||
-Xcodeanalysis-annotations=strict
|
||||
$TESTDATA_DIR$/codeanalysisUsage.kt
|
||||
$TESTDATA_DIR$/codeanalysis
|
||||
$FOREIGN_ANNOTATIONS_DIR$
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
+3
-3
@@ -12,9 +12,6 @@ where advanced options include:
|
||||
-Xassertions=legacy: calculate condition on each call, check depends on jvm assertion settings in the kotlin package;
|
||||
default: legacy
|
||||
-Xbuild-file=<path> Path to the .xml build file to compile
|
||||
-Xcodeanalysis-annotations=ignore|strict|warn
|
||||
Specify behavior for Codeanalysis annotations.
|
||||
Default value is 'warn'
|
||||
-Xcompile-java Reuse javac analysis and compile Java source files
|
||||
-Xnormalize-constructor-calls={disable|enable}
|
||||
Normalize constructor calls (disable: don't normalize; enable: normalize),
|
||||
@@ -32,6 +29,9 @@ where advanced options include:
|
||||
-Xjava-package-prefix Package prefix for Java files
|
||||
-Xjava-source-roots=<path> Paths to directories with Java source files
|
||||
-Xjavac-arguments=<option[,]> Java compiler arguments
|
||||
-Xjspecify-annotations=ignore|strict|warn
|
||||
Specify behavior for jspecify annotations.
|
||||
Default value is 'warn'
|
||||
-Xjsr305={ignore/strict/warn}|under-migration:{ignore/strict/warn}|@<fq.name>:{ignore/strict/warn}
|
||||
Specify behavior for JSR-305 nullability annotations:
|
||||
-Xjsr305={ignore/strict/warn} globally (all non-@UnderMigration annotations)
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@org.jspecify.annotations.DefaultNotNull
|
||||
public class A {
|
||||
public void foo(String x) {}
|
||||
|
||||
@org.jspecify.annotations.Nullable
|
||||
public String bar() { return null; }
|
||||
}
|
||||
Vendored
Vendored
@@ -0,0 +1,6 @@
|
||||
-Xjspecify-annotations=ignore
|
||||
$TESTDATA_DIR$/jspecifyUsage.kt
|
||||
$TESTDATA_DIR$/jspecify
|
||||
$FOREIGN_ANNOTATIONS_DIR$
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
Vendored
@@ -0,0 +1,6 @@
|
||||
-Xjspecify-annotations=strict
|
||||
$TESTDATA_DIR$/jspecifyUsage.kt
|
||||
$TESTDATA_DIR$/jspecify
|
||||
$FOREIGN_ANNOTATIONS_DIR$
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
Vendored
Vendored
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
-Xjspecify-annotations=warn
|
||||
$TESTDATA_DIR$/codeanalysisUsage.kt
|
||||
$TESTDATA_DIR$/codeanalysis
|
||||
$TESTDATA_DIR$/jspecifyUsage.kt
|
||||
$TESTDATA_DIR$/jspecify
|
||||
$FOREIGN_ANNOTATIONS_DIR$
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: type mismatch: inferred type is Nothing? but String was expected
|
||||
a.foo(null)
|
||||
^
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:3:5: warning: unsafe use of a nullable receiver of type String?
|
||||
a.bar().hashCode()
|
||||
^
|
||||
OK
|
||||
Reference in New Issue
Block a user