Mikhail Pyltsin
770cfd6fff
[java-parser] IJ-CR-153901 IDEA-366391 Inconsistent doc comment association after markdown support
...
- use language level to predict the order of comments
(cherry picked from commit e7986fcb2302dde7ad80fae9346f6a27edb576ae)
GitOrigin-RevId: f1cee2d3123a9a9845f999ac03984427799c84db
2025-02-13 14:23:53 +00:00
Mikhail Pyltsin
19af3dce28
[java-parser] IDEA-366391 Inconsistent doc comment association after markdown support
...
(cherry picked from commit 072bc109310e3059f3fab309dbd521ca2caad6e6)
GitOrigin-RevId: adabc2d3ad33c5f997f09565ddf24c4ef445290b
2025-02-13 14:23:53 +00:00
Bas Leijdekkers
b5a53393ed
Java: fix bad code is green problem (IDEA-366474)
...
"cannot reference super before superclass constructor is called"
(cherry picked from commit a2eeb5211fed697bc99ec9620bca4493c5a7adae)
GitOrigin-RevId: 6c404d216a804825e70d5c37866e3055dc8c5443
2025-02-13 14:23:53 +00:00
Bas Leijdekkers
3746633993
Java: match javac from jdk 24 in error highlighting for Flexible Constructor Bodies - JEP 492 (IDEA-364189)
...
(cherry picked from commit 686bd65963483f93acd22ae8956681f889105409)
GitOrigin-RevId: b8c02f835e7173b68aa39aee57e4a8c590608482
2025-02-13 14:23:53 +00:00
Bas Leijdekkers
8e0d1b142f
Java: fix error message (IDEA-364189)
...
(cherry picked from commit 6ddc29ca9af9523ac8597bc00b920b872a4250b6)
GitOrigin-RevId: 4ae3e61c614cde608f4593ec7fa758b2ed6c1a5d
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
b3f8bbb608
[java-highlighting] IDEA-365996 Constructor in an implicitly declared class is not highlighted as error
...
(cherry picked from commit 2de45c452608cea2ab314511060ac733259a8c18)
GitOrigin-RevId: daed31a96a3fb96a6cbed183443ed90205b679f3
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
e6ec1394ca
IJ-CR-151305 [java-import] IDEA-364508 support optimize imports
...
- fix comparator
(cherry picked from commit 5c6f0a4e689359a5574578cd63377543d413ccda)
GitOrigin-RevId: 5cc96fa8dc448e65fa2d58d5692f8af27e9ddd3c
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
105b965377
[java-inspections] IDEA-365059 Support JEP 494: Fix expand module imports
...
- modules shouldn't add implicitly imported classes
(cherry picked from commit d18b9bc7783a478cec3e75f95542c410ae78acd8)
GitOrigin-RevId: 4929fcc6fa1bf67fa799e6feef175593f246d614
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
cd9a60ab8f
IJ-CR-151305 [java-import] IDEA-364508 support optimize imports
...
- use layout table
(cherry picked from commit 6862419acc2beb72f87cca6b93612f9afe81f698)
GitOrigin-RevId: af86c63fa16f760ad3fd0b66fc9f86f7a21de7c7
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
46bfa503aa
[java-import] IDEA-364508 support optimize imports
...
- new options are added
- changes for optimize imports
(cherry picked from commit 82b0223f9e7e2972d13ab182ea651cdccd28a5d3)
GitOrigin-RevId: 99f0276e1d9464f75f5bbce91ad09727582d208b
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
dcb8e7a582
[java-inspections] IDEA-363980 Support JEP 495. Update ImplicitToExplicit /ExplicitToImplicit inspections
...
- tests
(cherry picked from commit 946428cb5f8e397625acbec9446d731fb0550225)
GitOrigin-RevId: b7240b0999796cb367dd01eb49ff51b63004de94
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
3348e7291f
[java-inspection] IDEA-363979 Conflicts with on-demand and module imports
...
(cherry picked from commit 0857df90e3f9cc450b48b56186573a9a89b5b041)
GitOrigin-RevId: 8e1474a59c687561ba5f00a13fecd4d2a9057b7a
2025-02-13 14:23:52 +00:00
Mikhail Pyltsin
aea70bba3b
[java-highlighting] IDEA-363617 Support JEP 494: Module Import Declarations (Second Preview)
...
- support shadowing module imports by package-on-demand
(cherry picked from commit 643fc10bcbfee2f1d41ec02e624b30bc3a48e4bb)
GitOrigin-RevId: d1e49b2d48f0b69f8e15393cb823e5529f9b4452
2025-02-13 14:23:52 +00:00
Bas Leijdekkers
2ec44412eb
Java: add "Layout on-demand import from the same package first" option (IDEA-204441)
...
enabled by default for consistency with other tools
(cherry picked from commit df5a4b65c5f31b195bd091a91d16ea0bc7bcc36c)
GitOrigin-RevId: 3b669ce15e9ad037bcff9c1e2638e2b823424ef7
2025-02-13 14:23:52 +00:00
Bas Leijdekkers
cd9b949072
Java: allow importing a class when there is a variable/method with the exact same name (IDEA-216101)
...
(cherry picked from commit e4c5b86ce2f4910711e33581c58d271dadbf6970)
GitOrigin-RevId: 6366d12eb83c3b5e20489b26d1ce0c531e52de47
2025-02-13 14:23:52 +00:00
Tagir Valeev
d08daf82f5
[java-inspections] IDEA-364908 WhileLoopSpinsOnField doesn't recognize lock
...
(cherry picked from commit 7a9fb186e4c23bf81a57cf1766a22cd6f85b5097)
IJ-CR-152528
GitOrigin-RevId: 0c49f423e2043958a2b11a95244f58b8e7323085
2025-01-09 19:00:03 +00:00
Tagir Valeev
a35bbc7c9c
[java-inspections] Preview feature warning: limit highlighting to method name
...
Fixes IDEA-362013 Stream.of should not be highlighted because it's not a preview feature
(cherry picked from commit 0818188d2e5ae25916c0433dfe976c808eebf869)
IJ-CR-151174
GitOrigin-RevId: c81154ec031a4da1ef432831628fe93537ce599b
2024-12-13 10:37:17 +00:00
Tagir Valeev
3eea2c8961
[java-analysis] Parameter nullability: prefer nullability known from type over nullability known from parameter declaration
...
Type nullability could be more precise if parameter is generic
Fixes IDEA-364343 False-positive NPE at unboxing inside lambda with JSpecify annotations
(cherry picked from commit 9a49f5687eccaa013e639cdf15950be911e100bc)
IJ-CR-151033
GitOrigin-RevId: be6c25b7e63a9d231077351fd0bf813515e7f9bf
2024-12-09 17:46:27 +00:00
Tagir Valeev
071179ffed
[java-intentions] IDEA-363624 Create Class generates invalid and redundant annotation @NotNull @NotNull for constructor parameter
...
(cherry picked from commit 9c3c9c55517369e6715c65a9696c287514261a10)
IJ-CR-151031
GitOrigin-RevId: 8306c8925395abd7dcee24de847335e4e9b1f535
2024-12-09 10:58:58 +00:00
Tagir Valeev
d2d87a71f3
[java-intentions] IDEA-363734 "Make Xxx impelent Yyy" quick fix inserts @NotNull
...
(cherry picked from commit 4e9a3f94cf1aedadd0b2c4699e168ccb3be0e405)
IJ-CR-150708
GitOrigin-RevId: ced9d4595e513387ebf996bf8dd0894877ef0f3e
2024-12-05 01:08:15 +00:00
Tagir Valeev
d2b1f518c8
[java-refactoring] IDEA-360614 Replace with single implementation: no downcast when 'this' is used
...
(cherry picked from commit f2ea406a5cf229cf9e63b6c2b53b9d86f245a6d9)
IJ-CR-150207
GitOrigin-RevId: 0eec797e7e9d105bf594aabd85533bd5c5395dd1
2024-11-26 19:12:59 +00:00
Tagir Valeev
300adf91fc
[java-inspections] IDEA-363792 Incorrect inspection suggestion to replace 0.0/0.0 with 1.0
...
(cherry picked from commit 72ea479f6b2c3a331685175b11459556ae0a29bf)
IJ-CR-150124
GitOrigin-RevId: 842566d57921ebcbe355cab6c17a6a09f08d486a
2024-11-26 12:30:58 +00:00
Tagir Valeev
b6f684ed23
[java-dfa] IDEA-363270 Misleading warning for switch case when expression on Boolean values
...
(cherry picked from commit 449fdf6cb9137b7dcd038adca7b26ffc15f7d59a)
IJ-CR-150040
GitOrigin-RevId: 957b8f5555a16e1e4912bc19bfe9ff133715709b
2024-11-25 14:43:15 +00:00
Tagir Valeev
32684d7e9f
[java-intentions] Create method from usage should skip external type annotation
...
Fixes (finally) IDEA-360115 Create method from List.of results in long jetbrains NotNull annotation
(cherry picked from commit 8e1657ad1d3af686e50c048eea1f7c439ec7365b)
IJ-CR-149633
GitOrigin-RevId: 1c86e8a1b9b0d5902f095ca7393bef8e2dea66d9
2024-11-19 14:11:05 +00:00
Bas Leijdekkers
7178d5454c
Java: correctly qualify method call when it is inlined from static interface method (IDEA-362625)
...
(cherry picked from commit 2f32664c77558fc4507a8a6ecc327f6c91b7d815)
IJ-CR-149100
GitOrigin-RevId: e224c59e90ff32687ebc67a278d1e63b52095fbd
2024-11-13 15:13:23 +00:00
Tagir Valeev
5e26c44314
[java-refactoring] isFirstUse: handle static method qualifier
...
Fixes IDEA-356148 Inlining method creates undesirable temporary variable
(cherry picked from commit 34091cb3a6c6388b2086d92e8cd4b206b9250202)
IJ-CR-149087
GitOrigin-RevId: 5d38476c8ff706eb180c628d7b481d0f7b00c7ff
2024-11-12 11:38:15 +00:00
Tagir Valeev
6fe3ec50ef
[java-refactoring] isFirstUse: take PsiAssignmentExpression into account
...
Fixes IDEA-361852 Java Inline Method refactor introduces intermediate variables
(cherry picked from commit 680fbb62f3440b7ae29f4de1793260fe5be0ab36)
IJ-CR-149087
GitOrigin-RevId: c9ede4356696412b656b0295f21f534cce04bc30
2024-11-12 11:38:15 +00:00
Mikhail Pyltsin
b95c1b84e7
[java-inspections] IDEA-360880 Replace cast expressions with pattern variable does nothing inside of ternary operator
...
- use PsiStatement as scope instead of PsiIfStatement
- more tests
(cherry picked from commit 2602190296988a80d54520c7a0f15fd0f8e3d942)
IJ-CR-147991
GitOrigin-RevId: 45d61e2aa9e70c3aa68032d21a77f05754a76534
2024-11-12 11:25:29 +00:00
Mikhail Pyltsin
21b790bb3f
[java-inspections] IDEA-360755 Convert to enhanced switch erases the default value
...
(cherry picked from commit 7562bb688c2bf6e93bab7537113bb54246949006)
IJ-CR-147994
GitOrigin-RevId: 07dc28c498da2f45ccf2dd0d88c9f603ddfb46b1
2024-10-30 20:48:51 +00:00
Tagir Valeev
1d58cede1d
[mod-commands] Rely on document text, rather than PSI text when building the final command
...
For some reason, they might be different. Probably due to incorrect PSI at the beginning of the action. In any case, document should be the source of truth, as the ModCommand will be applied to the document, rather than PSI
Fixes IDEA-359782 try postfix completion generates trailing garbage
(cherry picked from commit 292399a28d347f9b4fa22730002299d5c5b68167)
IJ-CR-147269
GitOrigin-RevId: 2ccd437d3c51c0ded16be634650ed8dfc59770b4
2024-10-22 14:39:05 +00:00
Tagir Valeev
93592a4c9e
[java-refactoring] CodeBlockSurrounder: avoid collapsing with unrelated if-statement
...
Fixes IDEA-360579 Inline Method creates uncompilable code
(cherry picked from commit cd73e3e730b8cef37f4a26235a2ab3db812f02ff)
IJ-CR-147183
GitOrigin-RevId: 0258e753bfb5f7e66bc4a0526769fe8ba07aa02c
2024-10-21 12:11:50 +00:00
Tagir Valeev
88e99a58b4
[java-dfa] Fix hardcoded contract for three-arg Arrays.binarySearch method (IDEA-359546)
...
(cherry picked from commit a4ff22126f7d6fc1b4a7d99ee47c3caf1b144c4c)
GitOrigin-RevId: 74f0bae69219b650eb170bc517e5c1bc0b1d9ad2
2024-10-17 13:15:40 +00:00
Tagir Valeev
bad69926e7
[java-inspections] Class can be record: fix Javadoc refs as well (IDEA-356432)
...
GitOrigin-RevId: 3dc09d1554037b46773b05b973b4a5905e5b3fe5
2024-10-14 15:13:57 +00:00
Mikhail Pyltsin
1512d52efd
IJPF-CR-24873 IJ-CR-145218 [java-inspections] IDEA-201932 Provide inspection to highlight redundant creation operations in java date time api
...
GitOrigin-RevId: 5af6c994aca832256f73eaa301cc21f6bb738316
2024-10-11 20:45:20 +00:00
Tagir Valeev
09bd11efd8
[java-refactoring] IDEA-71792 Support inlining of abstract methods having one implementation
...
GitOrigin-RevId: 00491acff53aff96705a866e0d799dfe22873d23
2024-10-11 08:10:27 +00:00
Tagir Valeev
676c19bc1f
[java-inspections] Report TYPE_USE nullability annotation on classes
...
GitOrigin-RevId: f5c6113ccd1738d72b0f58fe13a8352a043431c9
2024-10-11 08:10:27 +00:00
Mikhail Pyltsin
7e9f1978a2
[java-highlighting] IDEA-357214 'Module' is highlighted as an error when module name is expected
...
GitOrigin-RevId: c7ca9de1821e79b96a05ab74a3cbad7052ceb827
2024-10-10 15:17:07 +00:00
Mikhail Pyltsin
0e7c2be54f
[java-decompiler] IDEA-346312 adapt patch 044
...
- clean-up
- more tests
GitOrigin-RevId: 1f763889cae7396a9eaf081decc1e6a8c0785f11
2024-10-10 09:55:49 +00:00
Bas Leijdekkers
481fab7d13
Java: allow to "Inline to Anonymous Class" classes with static members (IDEA-360451)
...
GitOrigin-RevId: 835f91a1d35db9b78041da36c3bd147fa4e52ba3
2024-10-09 18:25:23 +00:00
Bas Leijdekkers
9404af07f5
Java: more refactoring warning message clarification (IJPF-CR-24908)
...
GitOrigin-RevId: c545eaecb2f911f77da5bd55121f95c1209fab29
2024-10-09 18:25:23 +00:00
Mikhail Pyltsin
e729bc10c8
IJ-CR-146190 [java-inspections] IDEA-360134 Support %n in format string
...
- support escape symbols
GitOrigin-RevId: 46d46c58b5a43d4aed1c1549326035b0bc32161e
2024-10-09 11:22:00 +00:00
Tagir Valeev
8ea673ff41
[java-analysis] PsiSubstitutorImpl: better preserve context; more tests
...
GitOrigin-RevId: 4765f00cf6a5eafe902b9fae73c450f475e3d8c8
2024-10-08 20:08:05 +00:00
Tagir Valeev
f5463b7662
[java-inspection] NullableStuffInspectionBase: better determine annotation name
...
GitOrigin-RevId: 1c00dc9d26ce2e8ebf78379fefbd6b3a9e764007
2024-10-08 20:08:05 +00:00
Mikhail Pyltsin
066fa7fe85
[java-inspections] IDEA-360279 Narrow the scope for ImplicitToExplicitClassBackwardMigrationInspection
...
GitOrigin-RevId: 7d1e2b8da9983291201eb214f9437c68aaa12b87
2024-10-08 16:45:11 +00:00
Mikhail Pyltsin
52fe84a033
[java-inspections] IDEA-360291 'Make method constructor' fix shouldn't be shown for implicit classes
...
GitOrigin-RevId: ba571565430db01d06d37f2da5ab49a97b466db4
2024-10-08 14:02:23 +00:00
Mikhail Pyltsin
a9a1a18b94
[java-inspections] IDEA-357275 "Convert class to record" quickfix throws IOE when inherit compiled class
...
GitOrigin-RevId: 3fef0a37b006d12b2728b98454071d0fd7d3b24f
2024-10-07 18:58:01 +00:00
Tagir Valeev
bfda3761a4
[java-analysis] NullableNotNullManager: take into account container for super owners as well
...
GitOrigin-RevId: b64e2e9453855fb5cad0279dd59a71080630931c
2024-10-07 18:02:44 +00:00
Bas Leijdekkers
81a6c7d02c
Java: support safe delete for record components (IDEA-245145)
...
GitOrigin-RevId: 5eccf46c5e0cce0d63c5ac480ad8d180b1ef0fed
2024-10-07 17:17:27 +00:00
Mikhail Pyltsin
81fe531f88
[java-inspections] IDEA-360134 Support %n in format string
...
GitOrigin-RevId: c7d3b60eec4a72ded2132a3ab24e035baf2c1241
2024-10-07 13:08:21 +00:00
Mikhail Pyltsin
77ec6df673
[java-inspections] IDEA-360135 Non-constant string concatenation in logging call could be triggered with exception argument
...
GitOrigin-RevId: b9a08671660f1a3cb27e566e1a9ed6a05cd211d4
2024-10-07 13:08:20 +00:00