Commit Graph

10232 Commits

Author SHA1 Message Date
Anna Kozlova
a0b3b2cce3 javadoc: fix repeatable annotations check (IDEA-265396)
GitOrigin-RevId: cadc4dcdfb3d0b9604550f0eaa6b390ec4b19c09
2021-05-26 19:26:24 +00:00
Anna Kozlova
a9d6f77e1c [java][safe delete]: filter light methods during override processing
EA-264091 (plugin) - CCE: SafeDeleteOverridingMethodUsageInfo.getOverridingMethod

GitOrigin-RevId: b1f4f93b052d697efc3f1f5ea0e02e3748b1a03f
2021-05-26 19:26:22 +00:00
Anna Kozlova
1705f01347 [java] lambda context: allow conditional with lambda branches in switch cases (IDEA-269928)
extract cast processing to the upper level as it's not allowed in conditions (^Tagir)

GitOrigin-RevId: 3e608c133d2b44d67f9b57721fbf62c04c2c4147
2021-05-26 19:26:22 +00:00
Alexey Kudravtsev
3ca98f7b1c IDEA-203657 Method name labels in call hierarchy are wrong for nested classes
GitOrigin-RevId: 27d32e47dc05e3775a82100485461b72e11b45c4
2021-05-26 13:01:31 +00:00
Alexey Kudravtsev
d4ae256d1b IDEA-55904 Hierarchy on Overridden Method Shows Impossible Callers of method
GitOrigin-RevId: 255c04f032bb96dae94434cc1072b615866eac09
2021-05-26 13:01:27 +00:00
Alexey Kudravtsev
99fb74d179 hierarchy: remove unnecessary test files
GitOrigin-RevId: fd02c3cc1d9cb0aea369e0c456e33d55d72704d7
2021-05-26 13:01:22 +00:00
Alexey Kudravtsev
6dbc2b96cf IDEA-203328 "Expand all" on call hierarchy of a recursive method never terminates
GitOrigin-RevId: 2943fbf7bca9276111667fe79a9fcb5f37fea86e
2021-05-25 12:23:07 +00:00
Tagir Valeev
7b78896a83 [java-dfa] Fix boxing on array store
GitOrigin-RevId: 86315b791135480438fd42eadf6420fdc9397107
2021-05-25 10:28:22 +00:00
Alexandr Suhinin
caab01294c IDEA-249164 IJ-CR-9284 fix comment tracking & ignore qualifiers to outer classes
GitOrigin-RevId: f5d07de538463dc6e2cca8d58ffd3c10e7d59d6d
2021-05-25 10:23:59 +00:00
Ilyas Selimov
e2083c6fd0 IDEA-269937 - suppressed warning for the class if its methods contain equals/hashCode/toString method calls
GitOrigin-RevId: 4f6f160baeb61810c3a76af51c8b9e3f8d8614da
2021-05-25 09:54:17 +00:00
Anna Kozlova
890efeaded [java]: redundant cast: treat switch expression branches separately (IDEA-269929)
GitOrigin-RevId: 4eecfab7aff32bc69164b740d1bd36f9a29b6cda
2021-05-25 06:42:14 +00:00
Anna Kozlova
5a42eae302 [java]: surround with: prefer same simple names for catch parameters (IDEA-269830)
GitOrigin-RevId: 9f8b5ced2ec29cbf0f23ccfdf18d4888a55e440d
2021-05-25 06:42:12 +00:00
Anna Kozlova
5ab478e48e [java] lambda context: allow conditional with lambda branches in switch cases (IDEA-269928)
GitOrigin-RevId: 5bdcade69a621a83cc88074dd566e401852d0fd0
2021-05-25 06:42:11 +00:00
Anna Kozlova
3ca476c193 introduce variable: choose target container for expressions lambda chain (IDEA-146687)
GitOrigin-RevId: b31853c45882fd96bbdea6d051f7ef08edde0916
2021-05-24 17:22:46 +00:00
Anna Kozlova
358f9086ce java inference: allow unresolved type parameters during potential compatibility check (IDEA-268866)
GitOrigin-RevId: f38e13385d534b025f8072e29a3558b0f2ecf4e7
2021-05-24 17:22:45 +00:00
Andrey.Cherkasov
da1d4d4fff SimplifyStreamApiCallChainsInspection: List/Set.of().stream() with Stream.of() (IDEA-269634)
GitOrigin-RevId: fb54184b6fc0597f2587f81fedf37df987d0977f
2021-05-23 19:58:32 +00:00
Tagir Valeev
d70063b9f2 [java-dfa] Avoid marking annotation method results as non-null
While annotation implementations created by reflection never return nulls, it's possible to create a custom annotation interface implementation and nothing stops from returning null in this case. This leads to false-positives.
Fixes IDEA-269686 Wrong inspection message for nullable return value of annotation
Rollback IDEA-151174 Annotation method return values are non-nullable

GitOrigin-RevId: 88301bd8f5fb69e1e78efc23ecc1416c7c441473
2021-05-21 11:42:30 +00:00
Bas Leijdekkers
223eeb0b0f WrapWithAdapterMethodCallFix: wrap with List.of() instead of Arrays.asList() on Java 9 and higher (IDEA-269380)
GitOrigin-RevId: f39f5c58348afb6b3c57dbc059860f940c6ec363
2021-05-19 10:44:07 +00:00
Alexandr Suhinin
d419b7b165 IDEA-249164 unnecessary this inspection: highlight calls to constructor
GitOrigin-RevId: 35c56a70e381163d147f5ac87037291049a78c9b
2021-05-18 10:28:06 +00:00
Ilyas Selimov
3642a47796 DFA - moved the tests associated with "Simplify" quick-fix to a dedicated place
GitOrigin-RevId: 8bd67d61335fc77c2f8e115bfda45ade06041283
2021-05-18 10:27:41 +00:00
Anna Kozlova
6660522b3e java push down: ignore visibility conflicts in inheritors (IDEA-211394)
GitOrigin-RevId: f51970b30e584b9ce319107b97a8c2ab2d22e79c
2021-05-17 17:53:05 +00:00
Andrey.Cherkasov
50f8045484 [java-inspections] Redundant char[] wrapping at String constructor could be replaced with String.valueOf() IDEA-262555
GitOrigin-RevId: cae0690cf100730f6a8502b17b57d7bb913a0cf0
2021-05-17 14:25:52 +00:00
Andrey.Cherkasov
8fca463779 [java-inspections] Report ScheduledThreadPoolExecutor with 0 in constructor and setCorePoolSize IDEA-265251
GitOrigin-RevId: 7a21597aa07bf24416499d13194867bbfe6bbd0d
2021-05-17 05:38:59 +00:00
Tagir Valeev
996a4cfe08 [java-dfa] TrackingRunner: correctly handle new merge-point
GitOrigin-RevId: 32b57745fe1a7cc646ad9426c723e79af196d500
2021-05-17 02:52:13 +00:00
Ilyas Selimov
d82ff9650f DFA - excluded boolean fix suggestion in conditional expressions which contain null expression types to prevent compilation error
GitOrigin-RevId: b0b956ad677ce1ecdc80070e25877aef8dc65100
2021-05-14 17:22:38 +00:00
Ilyas Selimov
85fd5fb24f DFA - removed smart pointers in the fix, changed naming and tests
GitOrigin-RevId: d136a7fee6bb26e8676d31d57a98f945959b3605
2021-05-14 09:49:42 +00:00
Tagir Valeev
f601577645 [java-dfa] Flush Set fields if Map changed and vice versa
Fixes IDEA-268907 The keySet size is not flushed when the original map is updated

GitOrigin-RevId: 092fe002a4143f705251464667c1c13df7f7aa94
2021-05-13 11:39:23 +00:00
Tagir Valeev
4ef5b8a616 [java-dfa] Avoid referencing to the variables in array initializers.
Variables could change after array initialization even if the array itself is constant
IDEA-222152 Incorrect processing of array initializer when it uses a reassigned variable

GitOrigin-RevId: 5d21b222302b04ab7d24467d9b834b5763a73588
2021-05-13 11:39:21 +00:00
Tagir Valeev
191288cc7c [java-dfa] Fix LVA for exceptions
GitOrigin-RevId: 137171dd7aade275974ab7a177d92f0d00825af7
2021-05-13 05:48:42 +00:00
Ilyas Selimov
a117b21680 DFA - added Boolean.TRUE/FALSE.equals() quick fix to unbox boolean nullable variable
GitOrigin-RevId: 45952b11139cf435e218ddd9c3ba57e237230eed
2021-05-13 04:38:40 +00:00
Tagir Valeev
8b850d6449 [java] JoinLines: support incomplete &&-expression
Fixes EA-266646 - AE: JavaParserUtil.parseFragment

GitOrigin-RevId: d9b0b9ebd0afe239a5c3086f4a27834ed475dc84
2021-05-13 03:45:12 +00:00
Tagir Valeev
93e33a0031 [java-dfa] Fix merging of '<' and '>' states into '!='
GitOrigin-RevId: ae525b6e3aaa4353a0d0840196e42d2c386d3c4c
2021-05-13 03:45:08 +00:00
Andrey.Cherkasov
c7ee606c95 [java-highlighting] fixes after review IDEA-216258
GitOrigin-RevId: 52b88a888751bb74e37b332c69d4ee0878ea26da
2021-05-12 23:25:01 +00:00
Andrey.Cherkasov
02e34802cf [java-highlighting] Don't suggest moving 'this' to the beginning of the list if there is already a receiver there
GitOrigin-RevId: d474d72a0fa00912a65f7ed32a85f2c2deec5e44
2021-05-12 23:24:58 +00:00
Anna Kozlova
700c807ded rename class: fix same name class conflict in the same file
GitOrigin-RevId: 9af5ae251b0d2e602009470019c3ac1f87bafce3
2021-05-12 14:07:04 +00:00
Ilyas Selimov
3a85b4d139 java - fixed insert return fix test
GitOrigin-RevId: 68248321a00c35871abb11b854b6d7368a7ce65e
2021-05-11 17:25:36 +00:00
Tagir Valeev
b6d4607a9d [java-intentions] Support type inference when suggesting to insert return (IJ-CR-8575)
GitOrigin-RevId: 0203d3a738d59d12c711ff8589f4293ec2bbf89f
2021-05-11 12:00:19 +00:00
Tagir Valeev
a9069f60e8 [java-intentions] IterateOverIterable: disable for empty lists and newly-created arrays (IJ-CR-8575)
GitOrigin-RevId: 78ef76ab85b1e051d0bb887801379136be041c5b
2021-05-11 12:00:19 +00:00
Tagir Valeev
b54f0b35a7 [java-dfa] Fix 'Find the cause' for new StateMerger implementation
GitOrigin-RevId: a45e482a2305bee3f8584ca04dc3658851666c7a
2021-05-11 12:00:17 +00:00
Tagir Valeev
52de7022a0 [java-dfa] StateMerger is rewritten
Now we just try to join exactly memory state pairs

GitOrigin-RevId: 3e19d20e9b4d8f1640cf1a552f42e6d38154c307
2021-05-11 12:00:11 +00:00
Tagir Valeev
cb6448267d [java-dfa] Fix stack flushing
GitOrigin-RevId: e953c3be78bcc3e43fcc9777d8573ff3650638e4
2021-05-11 12:00:09 +00:00
Anna Kozlova
cb57d3d15a java: deprecated still used: ignore static imports (IDEA-231054)
GitOrigin-RevId: 3d0ecd07bb99b483d46d43ddeffc46bcc67a070f
2021-05-10 17:20:23 +00:00
Anna Kozlova
a5fd904157 java: accept module/record component targets by default (IDEA-262023)
GitOrigin-RevId: e64346f24ac26ee5878ace72dd939afc9d5c3b24
2021-05-10 11:02:38 +00:00
Anna Kozlova
66873cdedb visibility based highlighting (IDEA-80384; IDEA-228556)
GitOrigin-RevId: 1c8c903d4bdc7be5459987cc5c081f302e4e2d16
2021-05-10 11:02:33 +00:00
Anna Kozlova
e3a891f354 api to mark places which were not checked by local inspection but would be checked in batch mode (IDEA-268840)
GitOrigin-RevId: 9619c101fcc7075c2d9713a05caa6293349b9145
2021-05-07 11:41:55 +00:00
Tagir Valeev
85e64205ca [java-analysis] findNullabilityDefault: use context at first level as well
Necessary for synthetic record accessors
Fixes IDEA-268161 NonNullApi does not work with Java record "getters"

GitOrigin-RevId: 365df82890ccb7d42144bac8cd8c87d727403f57
2021-05-07 09:46:47 +00:00
Tagir Valeev
b80119e45c [java-dfa] Test for record accessor nonnull
GitOrigin-RevId: 4b4d0af7b1fa069ae6d50b83738fa918b348fcee
2021-05-07 09:46:46 +00:00
Tagir Valeev
2a28853e00 [java-dfa] Properly handle class initializes in canBeNull; fix possible SOE
GitOrigin-RevId: 4f70eb29db67826b9134768a18b3dd113b147071
2021-05-07 04:56:58 +00:00
Tagir Valeev
368e9e61b0 [java-dfa] Properly support array intersection type
GitOrigin-RevId: c34efb104f8c0329427f54c67bf03ae69be7e5a8
2021-05-07 04:56:51 +00:00
Anna Kozlova
9b353baa95 make class static: created make created field final by default (IDEA-31585)
+ warn if fields should be used in class initializers which would cause NPE; test conflicts in tests

GitOrigin-RevId: a3db679f87d68924c94a3a9f082cafd527eebd5b
2021-05-06 21:21:42 +00:00