Commit Graph
1900 Commits
Author SHA1 Message Date
Tagir Valeev 49cd49dfa3 [java-dfa] Revise mutability: MUST_NOT_MODIFY
New level 'MUST_NOT_MODIFY' is introduced for parameters inside pure methods to signal that we should not modify these values, but we don't actually know whether they mutable or not (fixes IDEA-257286). Also, MUST_NOT_MODIFY is dropped inside nested closures, so we don't warn if parameter is modified there.

GitOrigin-RevId: f095e72be772eef8324ef2246fb0b7262beae20d
2021-02-01 08:25:58 +00:00
Anna Kozlova a5278f0dbb java type annotations: treat nullability annotations as type_use to avoid reordering of a modifier list (IDEA-206570)
GitOrigin-RevId: 292b1052c44815db83d6033a30b44e56c8b4fa34
2021-01-28 19:05:48 +00:00
Tagir Valeev 78652c8573 [java-inspections] RemoveInitializerFix: do not remove complete assignment when used
GitOrigin-RevId: 94dff2a177b1cc991c330276d093f5d3f652d6b9
2021-01-19 09:03:15 +00:00
Anna Kozlova 51adbd8f32 introduce variable: ensure array initializer is wrapped in new expr for var usage (IDEA-259249)
GitOrigin-RevId: 910d524ec157012a46aa8586c200f1a1b310c38c
2021-01-15 11:54:05 +00:00
Vladimir Krivosheev 912da5a7e8 reduce trove lib usages
GitOrigin-RevId: da64d033d2fff69893958d9f8a652370c1a1212f
2021-01-14 16:56:35 +00:00
Anna Kozlova 2005c6f14c java: testdata for IDEA-206570
GitOrigin-RevId: a4019ca264e699210cba91d30c47c266949d7563
2021-01-11 12:44:55 +00:00
Anna Kozlova 0e8e6abfcb java: override default with super call (IDEA-258822, IDEA-259098)
GitOrigin-RevId: 295ac3cb605800b005784674c2bac20f0de951ff
2021-01-11 12:44:53 +00:00
Anna Kozlova d66d66d259 type annotations: skip type annotation in generated code if it also has normal applicable targets (IDEA-206570)
GitOrigin-RevId: 651526af474d80f2664229f8c000c790152b3f0d
2021-01-11 10:31:05 +00:00
Anna Kozlova 7793b16164 java: replace explicit type with var: disable if TYPE_USE annotated (IDEA-259100)
GitOrigin-RevId: 4096a327d8c8f9f569fd82c2d6684f7f3d2090fe
2021-01-11 10:31:04 +00:00
Alexey Kudravtsev a2233e727f move test for fix in IJ-CR-4970 away from SuppressLIIJspTest because it has nothing to do with jsp
GitOrigin-RevId: 84111526ca761cc9b4cb468371e4455ef5b0fead
2021-01-07 13:57:00 +00:00
Anna Kozlova 42bb6297bc java create field from usage: don't go polyadic too deep for reference expressions (IDEA-235781)
GitOrigin-RevId: e3b48d82a489fd91917ffb0027f383aa236c425f
2020-12-30 13:08:33 +00:00
Artemiy Sartakov 7de400f55b Sealed classes: report permits classes that miss final/sealed/non-sealed modifier at permits list (IDEA-255805)
GitOrigin-RevId: 7d1c2c6d8f40302177b369838238858e44427c51
2020-12-22 10:40:52 +00:00
Anna Kozlova 1c6857ec2d java create class from new: don't create non-static inner if new expression can't be used afterwards (IDEA-97433)
GitOrigin-RevId: 89616c077ca5141db53b624ae08bc54b04d53cae
2020-12-18 19:01:32 +00:00
Anna Kozlova f535bd830e java create class from usage: setup super ref for created nested class (IDEA-257288)
GitOrigin-RevId: c5a37a119f50aa3468c74ce621108e00e1168852
2020-12-18 19:01:29 +00:00
Anna Kozlova fd17a8bb75 language level 16, remove language level 14_preview (IDEA-257409)
GitOrigin-RevId: 1f9626ba04ffd9588b0cf9b8a9f699faa613359b
2020-12-14 20:59:58 +00:00
Andrey.Cherkasov 99e697f12b IDEA-253512: Fix SlowAbstractSetRemoveAllInspection
GitOrigin-RevId: 4629a9d2c9b72a7e4b9974bf7c4d93dea98fe7fe
2020-12-07 20:34:07 +00:00
Anna Kozlova 6a0c39b3ee java: missed type cast suggestion on annotated types (IDEA-256942)
GitOrigin-RevId: 86dd16b919e602d375267b868c84384eb4e097cd
2020-12-04 21:20:39 +00:00
Andrey.Cherkasov 95a12db895 IDEA-253512: Fixes after review
GitOrigin-RevId: 0c9d42259d6a5169c449b536aa4e7b982446b10a
2020-11-30 15:12:44 +00:00
Anna Kozlova 3a646d1f0c java create local from usage: do not duplicate comments inside variable initializer (IDEA-256107)
GitOrigin-RevId: 3f9298e0d38ca0840a57922a7b9eb23c27277668
2020-11-26 12:11:11 +00:00
Andrey.Cherkasov d4dbc49dab IDEA-253512: Warn about possible O(N^2) in AbstractSet#removeAll calls
GitOrigin-RevId: 76f59d4f019482420142cdf760be3f9e4c7f4d1e
2020-11-25 15:18:45 +00:00
Andrey.Cherkasov 54ac372e2d Add tests for IDEA-173818
GitOrigin-RevId: 6646ccbf3c0ce543fba799d1a1f8ef5786ddc112
2020-11-24 18:20:43 +00:00
Tagir Valeev d35974faf8 [java-inspections] IDEA-255926 Support streams generated by StreamSupport StreamToLoopInspection
Only for non-parallel streams

GitOrigin-RevId: 08b517f557f0c376cc504ac654a9353a66ae9014
2020-11-24 04:36:33 +00:00
Bas Leijdekkers 4b18db9bfb Add quick fix to remove duplicate annotation without parameters (IDEA-249508)
GitOrigin-RevId: fea7daeb0bb40724325182d6041a20aa141fbbf2
2020-11-23 21:56:24 +00:00
Daniil Ovchinnikov 932ea20745 IDEA-252714 [java] use anchor if request is coming from tree child of target class
GitOrigin-RevId: 8248fb4f61867773b41c5274b52f2e73b3867972
2020-11-12 14:55:22 +00:00
Anna Kozlova c9c3a31e74 redundant suppression: search for text with suppressId in narrow element if applicable (IDEA-221643)
GitOrigin-RevId: 1b13bcda0f78e882ddd51a0d6eccb4a662a441c4
2020-11-09 17:12:46 +00:00
Bas Leijdekkers 0954a97685 IPP: make intention texts more distinguishable from each other
GitOrigin-RevId: 47d0fe080875ef6f68bac5fa3b2e836c2f5430c0
2020-11-06 13:43:59 +00:00
Anna Kozlova f8a53347cf java: split declaration & assignment: fix for very broken code (IDEA-254385)
forcePsiPostprocessAndRestoreElement may invalidate variable initializer

GitOrigin-RevId: 31b99804e5603cff36494ecbf9f98c1716b13d22
2020-11-02 20:18:09 +00:00
Anna Kozlova 48a0c3c03c java create class from usage: disable for expected array type or expected super class while enum/record can't have any
GitOrigin-RevId: 042aed924d9fc35e1ca86ae8660a7a75fe45bd25
2020-10-27 13:27:22 +00:00
Anna Kozlova dc51016e34 java: create class from usage: fix for patterns expression (IDEA-253733)
GitOrigin-RevId: e135c45026fc852ace913a57689380c5175f766e
2020-10-26 14:53:29 +00:00
Andrey.Cherkasov 3af0d4d509 IDEA-251250 fix texts for JavaDocLocalInspection
GitOrigin-RevId: 8897fd1a878deea3a724b8632fadd2e3b9095f06
2020-10-23 14:57:53 +00:00
Anna Kozlova 61231a0223 inspections: don't check redundant suppressions from inspections with global part (IDEA-208688)
local checks may be more pessimistic and it could lead to false positives

GitOrigin-RevId: 131000dee73567951cba939949e7abc267019eaf
2020-10-23 06:54:02 +00:00
Andrey.Cherkasov ce5ed84489 IDEA-251250 fixes after code review
GitOrigin-RevId: 383931c2a4caf3b4856ebbe9869f83c180f81879
2020-10-22 22:50:10 +00:00
Tagir Valeev 5495f1f9ea [java-analysis] Do not mark parameter as UNMODIFIABLE_VIEW if the method mutability is inferred
Fixes false-positive in RedundantUnmodifiableInspection

GitOrigin-RevId: 82cd0651ea87f62066a8a299ba3d5b572d617ab0
2020-10-22 07:46:18 +00:00
Andrey.Cherkasov f746cdbdc4 IDEA-251250 add quickfix for JavaDocs annotations for inspection "tag description is missing"
GitOrigin-RevId: 144bc690511b94af09184780d3621ff1e31b9068
2020-10-21 11:33:22 +00:00
Anna Kozlova 64cb6979ca redundant suppression: don't warn on "all" locally as global tools are not run (IDEA-253244)
GitOrigin-RevId: 3666dcf887e8a4735dee08f16e172c9272bfca24
2020-10-20 19:56:45 +00:00
Andrey.Cherkasov d8f40a6bf9 SuspiciousTernaryOperatorInVarargsCallInspection: fix test
GitOrigin-RevId: 8a62405481be34ff98f239ca345fc03d91dec520
2020-10-15 19:22:00 +00:00
Artemiy Sartakov ec0518a125 Sealed classes: create class from permits list reference now adds appropriate parent (IDEA-251830)
GitOrigin-RevId: 67f0506d9521f9b14eb5cfb99164eb1ba37f03b4
2020-10-15 11:43:45 +00:00
Tagir Valeev fdb5a1025d [java-inspections] CodeBlockSurrounder: disable in enum initializers
We could devise something like ((Runnable)() -> {...}).run() but this kind of code looks too ugly.
Fixes IDEA-252688 Assertion error when applying fix to assert not null in enums

GitOrigin-RevId: 6f2122acb60cfcb074cc47e6bc599626fe5547fd
2020-10-14 05:42:27 +00:00
Artemiy Sartakov b0c9f63799 Sealed classes: show create class fix instead of create type parameter in permits list (IDEA-251830)
GitOrigin-RevId: 4de0ea71c210e7da57f99b8295b7e511d9674120
2020-10-07 05:42:50 +00:00
Tagir Valeev d833da5281 [java-inspection] IDEA-252155 False positive "Lambda can be replaced with method reference" when casting with additional bounds
GitOrigin-RevId: 2b752e6b47a0d53b05b4e7cd98064c5ce54e2904
2020-10-06 08:04:23 +00:00
Tagir Valeev ebc61af5e8 [java-intention] CollapseIntoLoopAction: disable inside switch and on declarations (IDEA-251600)
GitOrigin-RevId: de00fe6b26f1969f8f9df0ac2d944ec76f402c8c
2020-10-02 04:09:06 +00:00
Andrey.Cherkasov 4d2632fc41 Fixes after review: IDEA-202309
GitOrigin-RevId: 542cdc5e1c3b401a6a3e37504cf9351212aac4be
2020-09-28 10:57:18 +00:00
Andrey.Cherkasov 6fbd744430 RedundantUnmodifiableInspection created: IDEA-202309
GitOrigin-RevId: d5a5e1f45ba0f6e0af786ca588caaa192cd4b554
2020-09-25 11:52:07 +00:00
Andrey.Cherkasov f65fd090cd Fix test IDEA-244144
GitOrigin-RevId: fe15366aaed97e7c3f0c07453a51d121ab3ab3bc
2020-09-23 09:12:25 +00:00
Andrey.Cherkasov 9845c0a0c2 Support parentheses, fix bug when the array branch has a primitive array, more tests: IDEA-244144
GitOrigin-RevId: 4c644d8b1e11869e4f3853763d09d7e0b91b5740
2020-09-22 12:24:19 +00:00
Tagir Valeev a0f0dabaa4 [java-highlighting] IDEA-246748 Remove support of C-style array declaration in record components
Actually suggest a fix if somebody uses it

GitOrigin-RevId: 57ee72ebdc99ebe506a88696bf37f9319cdbcc33
2020-09-21 09:44:54 +00:00
Andrey.Cherkasov eb5e81dcb4 SuspiciousTernaryOperatorInVarargsCallInspection created: IDEA-244144
GitOrigin-RevId: cc56e98bf46b87d1b685177a72bccfd4fc80a596
2020-09-18 23:04:15 +00:00
Andrey.Cherkasov 50af51d8d1 Support the case when then array initializer is taken into parentheses; more attention to comments in fix: IDEA-238645
GitOrigin-RevId: d4557daa9b37e9f103b6453d9e0ad3a18df0a870
2020-09-16 12:30:36 +00:00
Andrey.Cherkasov d6ecf8f1f0 Fixes after review: IDEA-249165
GitOrigin-RevId: 5f90b50bd298dbc73283a6b2e78267483211c111
2020-09-15 21:23:00 +00:00
Tagir Valeev 390a408fa0 Bundle ICU4J; create NlsMessages to format duration and and/or lists
Fixes IDEA-247854 Formats#formatDuration is not localizable

GitOrigin-RevId: adb56cac0ecc7c47a644887e3eb17e9ca26b47bd
2020-09-15 04:50:16 +00:00