Commit Graph

7343 Commits

Author SHA1 Message Date
Bas Leijdekkers
fb29b4a8f5 Java: remove some unused properties
GitOrigin-RevId: 5596e0f45c7e187ca2888a2b19c016b8fe74ae35
2023-12-11 15:43:15 +00:00
Michail Plushnikov
61fe7a68b6 [lombok] IDEA-333062 IDEA-255688 Added support for underscored (_) syntethic onX-Methods of lombok onX-Annotations
Reduced usages of custom HighlightErrorFilter

GitOrigin-RevId: 7aa66eb9ecb9cc2e534015893d4701ab37d32f1c
2023-12-10 20:10:01 +00:00
Tagir Valeev
2a4fc312fb [java] IDEA-327241 Enable compilation and running Java projects with configured unsupported preview versions
GitOrigin-RevId: df85f51ac1d4249ec3baf34f5ce7d150e06d2a13
2023-12-09 13:20:33 +00:00
Tagir Valeev
a8f88fa062 [java] Use HighlightingFeature.LVTI
GitOrigin-RevId: ce2d4c1a6338457ff57f691fc6fdc2542de5022c
2023-12-09 12:53:05 +00:00
Tagir Valeev
5b6191dd34 [java] "any" type parsing (early Valhalla prototype) dropped
It's unlikely that the final version of value types in Java will use this syntax.

GitOrigin-RevId: 382ec771eaac29c079cf48819f98fd155775b283
2023-12-09 11:55:52 +00:00
Mikhail Pyltsin
9aa54b1fd4 [java-highlighting] IDEA-340211 Unnamed variables, turn on for java 22 (JEP 456)
- turn on for java 22
- add more tests for java 22

GitOrigin-RevId: 62b25e768ef827da94acffc8a9054c6b5775254e
2023-12-08 17:13:29 +00:00
Bart van Helvert
7a58d3956d [java-i18] Fix I18N inspection for when clauses after forcing injection host
#KTIJ-27448

GitOrigin-RevId: 98fc1e9cabaa9c9a3da6924d4476661f8d5e3d17
2023-12-08 10:59:35 +00:00
Bart van Helvert
e4bffbaa29 [java] Fix getting value from return expression after enabling uinjectionhost
#KTIJ-27448

GitOrigin-RevId: 81e1429232d0ac92af857274e0becc271d349bbf
2023-12-08 10:59:35 +00:00
Bart van Helvert
d2107596ae [java-i18n] Normalize both arguments when comparing in getParameter
Fixes retrieving parameter for arguments when the argument is a polyadic string literal. #KTIJ-27448

GitOrigin-RevId: 2b40bdb8a6e6f8609daf2b92f2c1ba0a8abb6288
2023-12-08 10:59:35 +00:00
Michail Plushnikov
4222be044e [lombok] IDEA-255688 Using existing functionality to skip checking expressions from field initializer
and to skip checking field initializer expression

GitOrigin-RevId: 67211ecbad65889dabe6385678cc1b7c47a96deb
2023-12-06 20:52:19 +00:00
Aleksey Dobrynin
72fd70e1d4 [java] modules: refactoring
GitOrigin-RevId: 5673d698548734cec85d5c6368e6aa16fd3fe3b9
2023-12-06 15:27:00 +00:00
Aleksey Dobrynin
d7659ef157 [java, highlighting] modules: show only 1 service provider gutter IDEA-185484
GitOrigin-RevId: e628be149707e4725b901b92d61ea7cbde28d0e0
2023-12-06 15:26:57 +00:00
Michail Plushnikov
67578dcd6c [lombok] IDEA-255688 Partial Revert: Get rid of LombokHighlightErrorFilter for "Redundant Initializer Inspection"
already fixed with 24c8ea6896925f9af478b38e9a923d2ec4678ee9

GitOrigin-RevId: b1a1cf8a7fcf6a35cd67bf07fdf67fbc9415d1e8
2023-12-04 21:22:00 +00:00
Michail Plushnikov
735b2abf1d [lombok] IDEA-255688 Get rid of LombokHighlightErrorFilter for "Method call can produce NPE"
Used in case of lombok lazy Getter

GitOrigin-RevId: acdb7e17facdf763a5b824ed945c69fc18646563
2023-12-03 20:41:43 +00:00
Michail Plushnikov
b2853a3590 [lombok] IDEA-255688 Get rid of LombokHighlightErrorFilter for "Variable initialized before usage Inspection"
Used in case of lombok lazy Getter

GitOrigin-RevId: 37699b68fd2431efe92d05e86a3b09cb59e673b8
2023-12-03 20:12:05 +00:00
Michail Plushnikov
31cbcdbfaf [lombok] IDEA-255688 Get rid of LombokHighlightErrorFilter for "Redundant Initializer Inspection"
GitOrigin-RevId: abc94f0640f5cd30b1d82c3c4093474d17c2e5d6
2023-12-02 20:53:58 +00:00
Tagir Valeev
31cdc5e672 [mod-commands] ModCommand.chooseAction static method instead of ModChooseAction constructor
GitOrigin-RevId: 8a00b38108c8fff77a967749f16550f067191d2d
2023-11-29 15:43:25 +00:00
Tagir Valeev
241aea81b1 [mod-commands] ModShowConflicts replaced with static method showConflicts
GitOrigin-RevId: 471ff5387f33c3a82d67a05957396d1312ebcbbd
2023-11-29 15:43:21 +00:00
Mikhail Pyltsin
5f6d948648 [java-inspection] IJ-CR-119988 IDEA-264141 Warn if compact constructor calls methods that access fields
- support chain constructors with one target
- added more tests

GitOrigin-RevId: 4e9d7680cb3e74d3e6343fbe2c32c6b476bb04e5
2023-11-29 14:18:25 +00:00
Tagir Valeev
d26fdd1e80 [java-dfa] Fix super() call qualifier
Also: do not flush fields of this class when pure super-constructor is called
Fixes IDEA-337287 "Constant values" false-positive when base class constructor calls overridden method with field initialization

GitOrigin-RevId: 477fc87c4b679b3aa0bcdc5723bcffb644ab6976
2023-11-29 12:37:55 +00:00
Aleksey Dobrynin
2968c44e55 Refactoring: use constants instead of strings
GitOrigin-RevId: a5132bfb7c7f57ac96c6f7b171447d783f2f9cdf
2023-11-28 17:29:28 +00:00
Karol Lewandowski
ad246cb491 IDEA-337709: Reimplement SuppressionAnnotationInspection to UAST
GitOrigin-RevId: 5384975e4786fbc34114065e117f66d930435621
2023-11-27 18:29:28 +00:00
Mikhail Pyltsin
d806c4c420 [java-inspection] IJ-CR-119988 IDEA-264141 Warn if compact constructor calls methods that access fields
GitOrigin-RevId: 350232d305b02b49689b18eed113bdbdad108671
2023-11-27 17:22:11 +00:00
Aleksey Dobrynin
bf11fe39ed [java, inspections, fix] IDEA-322244 IJ-CR-114846
check JUnit version

GitOrigin-RevId: ac865d315224bd11650b8aa0f88f60b8242da000
2023-11-27 15:11:52 +00:00
Elena Shaverdova
17e66e639b Clean-up: improve grammar and provide generics
GitOrigin-RevId: deb89d2910dcdacf8f27025639a9b3bda50ae309
2023-11-22 20:56:52 +00:00
Elena Shaverdova
9e77f9bb03 IDEA-331326 Create FUS event for stub index inconsistency
GitOrigin-RevId: 8194bd9128dd7639655b335bed6747d6ce046b14
2023-11-22 20:56:50 +00:00
Tagir Valeev
a8914e5c86 [java-inspections] IDEA-338478 Pattern variable can be used: support more narrow casts
Also, support the same in SimplifyBooleanExpressionFix (IDEA-336123)

GitOrigin-RevId: 240383f6ca67d8b7734ac51a6fe8781538e4f254
2023-11-22 20:31:30 +00:00
Dmitry Kichinsky
dc25e16021 [Workspace Model] IDEA-308190 store all manifest attributes in java module settings
GitOrigin-RevId: 211cc59375651ef4674c5e2500a05f389eba9e28
2023-11-20 22:22:30 +00:00
Michail Plushnikov
e2eaabf6b8 [lombok] IDEA-302513 fix usage with lombok producing IncorrectOperationException
GitOrigin-RevId: 6dc7b9e1c13a988dbeff3fc1f01d564a3e6df290
2023-11-18 21:26:14 +00:00
Tagir Valeev
2a4ceade93 [java-dfa] Cosmetic
GitOrigin-RevId: 8d8d8c2f21330d7faee8f357acedee070e9cbe05
2023-11-17 18:10:55 +00:00
Mikhail Pyltsin
f02fd0e658 [java-inspection] IDEA-264141 Warn if compact constructor calls methods that access fields
- added in DFA logic to check if it is possible to have initialized variable if there is a call in constructor

GitOrigin-RevId: b5b1647df7e4ed116fef095037f48441c36f71a8
2023-11-17 11:27:48 +00:00
Bas Leijdekkers
9bcb2a6194 Java: remove workaround hack now that UAST supports resource expressions (IJ-CR-119831)
GitOrigin-RevId: 803dadd65b91ac5c0c4ab9ad7aeef2c5c6ab3d5a
2023-11-17 02:23:59 +00:00
Tagir Valeev
dfeffcd033 [java-analysis] IDEA-328240 Dummy android jar is not recognized when located in .m2 repo
GitOrigin-RevId: 0f30ec1df8c68dbcdbc162c72bf16ea3201b13bc
2023-11-15 21:43:28 +00:00
Tagir Valeev
ff15d064cd [java-inspections] SimplifyBooleanExpressionFix: try to move pattern variable to another instanceof when possible
Fixes IDEA-336123 "Constant values" fix produces red code when pattern variable is removed

GitOrigin-RevId: 7faf8dd77569c21d69a9a7226d6db1b0097f9231
2023-11-15 21:43:24 +00:00
Tagir Valeev
c49a062434 [mod-commands] ModShowConflicts: exclude next step
Simply continue execution of the outer ModCommand

GitOrigin-RevId: a4ed40d46114c25f5502305567355b3419b3524e
2023-11-15 21:43:21 +00:00
Tagir Valeev
9141de103f [mod-commands] Better API for ModUpdateSystemOptions
GitOrigin-RevId: 6a7ea0edf7cb2725dc8b45887450d5aa078fe85d
2023-11-15 21:43:10 +00:00
Tagir Valeev
af0c7f16eb [java-intentions] RemoveAllUnusedImportsFix: ModCommand
GitOrigin-RevId: 15068d5353483fc34f81ec535d074c953cae9328
2023-11-15 21:43:03 +00:00
Dmitry Kichinsky
a113b039a1 [java] IDEA-308190 get Automatic-Module-Name manifest attribute from java module settings
GitOrigin-RevId: cf1fa15f7e98934c814db3e866e1194980e3ca70
2023-11-15 20:42:29 +00:00
Bas Leijdekkers
2d6294fd9f Java: avoid CCE (EA-940311)
GitOrigin-RevId: 24299d5741665a14bdd5e58f832ae9eca93bb71d
2023-11-15 18:28:32 +00:00
Tagir Valeev
9c34f534f0 Warnings fixed; use assert methods instead of assert statement in IndexTest
GitOrigin-RevId: 3dd424a70347aa82025aae9047818b2b6cc11667
2023-11-14 11:01:20 +00:00
Tagir Valeev
17a223b66d [mod-command] NullableNotNullManagerImpl: OptionController; used in ChangeNullableDefaultsFix
GitOrigin-RevId: 66d6128248cd06e81cb3ec7826265ea4a23b7dbf
2023-11-14 11:01:16 +00:00
Tagir Valeev
34479d8af2 [mod-command] EntryPointsManagerBase as OptionControllerProvider
The corresponding intention actions converted to ModCommand now
Part of IDEA-337707 Create a uniform API to read/update various persistent settings

GitOrigin-RevId: 3a508e2a97fd2f1967c78aef2e82b661d1d8325a
2023-11-14 11:01:07 +00:00
Tagir Valeev
dfc7b6c5ce [mod-command] Experimentally prefix inspection options with inspection itself
Also: make BaseInspection.formatString robust against separate field changes

GitOrigin-RevId: 0211c954c6496ae92f894b032baeac616a6c9f1c
2023-11-13 21:00:44 +00:00
Aleksey Dobrynin
e5b2194515 [java, inspection] new inspection "while can be do-while" IDEA-250650
GitOrigin-RevId: bd2bd0053500b98a316330b08481018825e9211f
2023-11-13 17:41:19 +00:00
Mikhail Pyltsin
87dc3f3fbf [java-highlighting] IDEA-289314 Missing highlighting for nested type annotations on static types
- annotations are checked recursively

GitOrigin-RevId: a8343f6bbfbf2dd39b29dad8ce1e989e71a0e549
2023-11-13 17:04:49 +00:00
Mikhail Pyltsin
8adeaf3193 [java-highlighting] IDEA-306108 Assignment to a variable with non-denotable type: confusing error message and useless quick-fix
- add `anonymous` when it is not clear what type is used

GitOrigin-RevId: f3395a590fd4a48a5570fdf9ace540845e5f3879
2023-11-13 17:04:45 +00:00
Tagir Valeev
eb8ca83ed2 [java-inspections] ReplaceAnnotationByForRemovalAttributeFix: ModCommand
GitOrigin-RevId: fa4217892f613bbc0f2d22ae985a9d15a61b41d3
2023-11-13 13:46:33 +00:00
Bas Leijdekkers
8a3ec7ba0d Java: Unused Declaration - recognize resource expressions in batch mode (IDEA-330141)
GitOrigin-RevId: b382042eeb7b90301f4de90456da51026e045200
2023-11-12 18:00:11 +00:00
Bas Leijdekkers
6631881072 Java: Unused Declaration - recognize operator assignment as read access (IDEA-330149)
GitOrigin-RevId: 5561bd503c9f7bfe0fc5e6eca209d0f272ed50ec
2023-11-10 15:57:27 +00:00
Bas Leijdekkers
9ca17ef673 Java: more accurate serializable field detection
GitOrigin-RevId: a8d9b035a02c0605dd5ed14d26cbe1c935f101a2
2023-11-10 15:57:26 +00:00