Commit Graph

28 Commits

Author SHA1 Message Date
Denis Zharkov dfb1cb8642 Minor. Rename UnknownNullness -> NullnessUnknown 2020-10-08 14:00:09 +03:00
Denis Zharkov 0b958c8ac5 Fix annotation name in test data to DefaultNullnessUnknown 2020-10-08 14:00:09 +03:00
Denis Zharkov f3a490ee16 Support compiler flag -Xcodeanalysis-annotations 2020-10-08 14:00:09 +03:00
Denis Zharkov 6c37574fce Rename Jsr305State -> JavaTypeEnhancementState
Also, rename some of the properties
It's needed to store status for codeanalysis annotation in that class
2020-10-08 14:00:08 +03:00
Denis Zharkov 2f04a1505d Support enhancement for unbounded wildcards from codeanalysis annotations 2020-10-08 14:00:07 +03:00
Denis Zharkov 392ef9aa2b Support type arguments enhancement from type parameters bounds
Currently, only works for codeanalysis annotations because
type parameters bounds are enhanced only for them
2020-10-08 14:00:07 +03:00
Denis Zharkov e9e05c53e1 Support enhancement for type parameter based types
Load them as non-flexible when a relevant type parameter has non-flexible upper bound
(Currently, it only works for case of codeanalysis annotations)
2020-10-08 14:00:07 +03:00
Denis Zharkov e27501497b Support codeanalysis annotations on type parameters bounds 2020-10-08 14:00:06 +03:00
Denis Zharkov 82d39dd86a Add basic support for default codeanalysis annotations 2020-10-08 14:00:06 +03:00
Denis Zharkov 517cc84f4d Add initial support for codeanalysis annotations 2020-10-08 14:00:06 +03:00
Mikhael Bogdanov 32bcab2867 Switch rest of test to new scheme with configuration kind processing 2020-03-04 14:51:21 +01:00
Mikhail Zarechenskiy 319a38bd5c [NI-MIGRATE] Update diagnostic messages 2020-02-13 11:15:59 +03:00
Denis Zharkov f6c6f67566 Minor. Remove irrelevant JAVAC_EXPECTED_FILE directive in tests
This change fixes these tests
2018-02-09 10:54:28 +03:00
Denis Zharkov 88a23c73c7 Ignore @Nullable annotation for vararg parameter
See the comment in code for clarification

 #KT-19786 Fixed
2018-02-08 13:36:10 +03:00
Denis Zharkov da52716bfd Fix wrong nullability enhancement for annotated java.lang.Object type
Effectively, this commit drops cached value for j.l.Object type
This cache was introduced when types were immutable, but they
became mutable after starting reading top-level TYPE_USE annotations,
that lead to changing shared JAVA_LANG_OBJECT_CLASSIFIER_TYPE instance

 #KT-20826 Fixed
2017-10-20 09:43:38 +03:00
Denis Zharkov 13bf35f48e Make TYPE_USE default qualifiers overriding all other applicabilities
If there is default qualifier with TYPE_USE closer than one with METHOD
then its nullability should be considered even when enhancing return type

 #KT-20016 Fixed
2017-09-29 10:01:04 +03:00
Denis Zharkov fd9025a4fb Add Java8 foreign-annotations tests without jsr305.jar in the classpath
Some of them are expected to fail since neither IntelliJ class reading
nor our fast class reading can read annotations on type arguments
2017-09-26 16:40:47 +03:00
Denis Zharkov 58a0ca61a9 Minor. Fix java test data to make it actually compilable 2017-09-26 16:40:47 +03:00
Denis Zharkov 71f85812d6 Improve support for TYPE_USE default qualifiers
- Apply default qualifiers to type arguments if they contain TYPE_USE
in applicability list
- Read TYPE_USE placed default qualifier annotations

 #KT-19592 Fixed
 #KT-20016 In Progress
2017-09-26 16:40:47 +03:00
Denis Zharkov 02d3d9785c Move JSR-305 tests to one directory and strip common name prefix 2017-09-26 16:40:47 +03:00
Dmitry Jemerov cc8fbf6078 Store third-party annotations in a separate directory 2017-09-13 17:25:20 +02:00
baratynskiy 01883a41cb javac-wrapper: refactoring, fixes and tests 2017-08-29 18:01:36 +03:00
Denis Zharkov e26c210d69 Support TypeQualifierDefault from JSR 305 for nullability qualifiers
#KT-10942 Fixed
2017-07-03 17:55:37 +03:00
Denis Zharkov 57b7b91444 Do not add container annotaions to type artificially
It was only used for type-related nullability/mutability
annotations and it was necessary to remove them
in the descriptor renderer (duplicating their fqnames there).
At the same time they're only needed for types enhancement
where they can be simply restored from type owners' descriptors

The testData changes are more or less correct: this kind of annotations
is bound both to types themselves and their use because of their targets
2017-07-03 17:55:37 +03:00
Valentin Kipyatkov ec51076355 DescriptorRenderer to render annotations for all types + separate option to render annotation arguments + use it in IdeDescriptorRenderers 2016-10-11 23:38:54 +03:00
Denis Zharkov 10c840327d Temporary move annotation to methods' modifier list
Java resolver ignores return type annotations if there are ones on modifier list

Related to this commit https://github.com/JetBrains/intellij-community/commit/a2497edceec614cdb5b76ba552f8a035f9e159f8
2016-09-20 15:26:50 +03:00
Denis Zharkov e96024017f Move and fix tests on typeEnhancement with TYPE_USE annotations 2016-03-16 20:22:59 +03:00
Denis Zharkov a644dd3ae9 Create tests for TYPE_USE nullability annotations
- tests and declarations for checkerframework has been moved,
because they only Java 8 targeted
- tests for eclipse annotations has been just copied,
because there are two jars: one for Java 8 and other for earlier versions
2016-03-16 20:22:59 +03:00