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
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
dc032bf4a7
IJ-CR-151018 [java-inspection] IDEA-363979 Conflicts with on-demand and module imports
...
- introduce enum for conflicts
- add annotations
- direct implementation isOnDemand for PsiImportModuleStatementImpl
(cherry picked from commit a116b4952b6498e98740d115cace170512d0d59a)
GitOrigin-RevId: 27f28ecf92cd147f13c5e5a6ebe123b7962aa4f1
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
6113015d06
[java-highlighting] IDEA-363617 Support JEP 494: Module Import Declarations (Second Preview)
...
- support transitive for dependencies on 'java.base' module
(cherry picked from commit a364934e96592ae3a8244ae68b2fb5372e7f5a30)
GitOrigin-RevId: 6bffa2d03645e77537d70cd4d9d081dec80680af
2025-02-13 14:23:52 +00:00
Bas Leijdekkers
44840c3a42
Java: remove duplicated utility method
...
(cherry picked from commit e539495083603140f3fd4176374ad5a0e01852c1)
GitOrigin-RevId: 612d250c0a6550e3ae733cf78f4016013b20d7b8
2025-02-13 14:23:52 +00:00
Bas Leijdekkers
e1b1b53039
Java: remove unused record class
...
(cherry picked from commit 8a82fa67e6fde0a4cb734d4f9f427a00203ed01c)
GitOrigin-RevId: 449dd9824bff9ec6829536e65918cdab740d3a04
2025-02-13 14:23:52 +00:00
Bas Leijdekkers
b21fd06310
Java: don't expose implementation detail in API
...
(cherry picked from commit 952d1b3c68f9a011ad7826cc8a1075f2ef990e6d)
GitOrigin-RevId: 87445fc4969225a3a03befab8a5ce5640283cc53
2025-02-13 14:23:52 +00:00
Vojtech Balik
ce9bd6f4cc
[code-vision] IJPL-174861 remove redundant ProgressManager.runProcess call
...
If the thread is running under a ProgressIndicator already, this call will throw.
If there is no indicator, passing fresh EmptyProgressIndicator without using it has no meaningful effect.
IJ-MR-153718
GitOrigin-RevId: b03f13d945561083ecbf8609fa7162ecdbdc3107
2025-02-03 14:16:27 +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
0a7dce9cba
[java-refactoring] Avoid local ref cache during inline refactoring
...
Useless anyway, as the files are constantly updated; does many unrelated computations
IDEA-364541 Inline method spends a lot of time inside getVariableReferences
(cherry picked from commit 1814ada8815641cb9159bbe10bc28c719d2bbf44)
IJ-CR-151330
GitOrigin-RevId: 406d056a261e17cf8d34d5b4edfa4a7a9e592d1a
2024-12-11 18:52:24 +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
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
44ee539dbd
[java-dfa] AssertJInliner: support WithAssertions (IDEA-361718)
...
(cherry picked from commit e785553c79409934f7097b5956db12705d5a623b)
IJ-CR-149830
GitOrigin-RevId: a1d882d0662761bde872ba3ab2b7c79a4c7746af
2024-11-21 14:48:10 +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
c49291c780
[java-analysis] CodeBlockSurrounder: workaround google-java-format problem (IDEA-340109)
...
(cherry picked from commit ff8a2a9d628140942ccb11d84c4aa4c2ced2df47)
IJ-CR-147066
GitOrigin-RevId: 404efbcd84a9c45c34ed0039559de2c8d111a19e
2024-10-18 11:14:01 +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
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
Bart van Helvert
51c1afc502
[jvm] Support @Extensions in JUnit malformed declaration inspection
...
#IDEA-360210 Fixed
GitOrigin-RevId: 90317c39c05c55757bcd2cae30e41d6b398c6926
2024-10-11 12:23:22 +00:00
Tagir Valeev
feb2ee9625
Warnings fixed (mostly redundant cast)
...
GitOrigin-RevId: 63bdb7f359a1a2cd37cb6a691b3d94db8ba3ce02
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
Tagir Valeev
f5463b7662
[java-inspection] NullableStuffInspectionBase: better determine annotation name
...
GitOrigin-RevId: 1c00dc9d26ce2e8ebf78379fefbd6b3a9e764007
2024-10-08 20:08:05 +00:00
Georgii Ustinov
c02d32ef74
[Java] Make JavaSpellcheckingStrategy dumb aware
...
IDEA-357681
GitOrigin-RevId: 1fead4d1fdb98c99d8b68d48813f483deaa6b35c
2024-10-05 10:25:23 +00:00
Nikolay Chashnikov
0e4dd0cedc
[java] API cleanup: remove unused deprecated API (IJPL-156972)
...
GitOrigin-RevId: c8cfa9d13c20cd712f9ab3ab1b8e5fcfd9a2ecaf
2024-10-04 17:44:13 +00:00
Tagir Valeev
b223a53bc3
[java-dfa] NotNullByDefault: implicit Object bound is affected by annotation; more tests (IDEA-359811)
...
GitOrigin-RevId: a3576ee5f2b100b7e68536881a55d0c9a2f9771b
2024-10-02 14:26:44 +00:00
Tagir Valeev
3ec30c1c1b
[java-highlighting] IDEA-359187 LVTI: 'lambda expression requires an explicit target type' not highlighted as error when in parenthesis
...
GitOrigin-RevId: 248072c38aeaf7f05b088c04bc435ecd0e940dd8
2024-10-02 14:26:44 +00:00
Vladimir Krivosheev
bfb4e40f3c
convert intellij.jvm.analysis.impl to V2 module
...
GitOrigin-RevId: aac0cb7c6c3d40f424d468a4eedd34507dc2f2ef
2024-10-01 09:52:32 +00:00
Bas Leijdekkers
4a233dcb96
Java: cleanup redundant cast util
...
GitOrigin-RevId: 848cba730948a86edc6e9caf8d55f3d82814f058
2024-10-01 09:31:57 +00:00
Bas Leijdekkers
af458693d5
Java: don't insert unnecessary casts on inlining method (IDEA-203962)
...
GitOrigin-RevId: c3f441b42d164438b1035112083a8114735a0a05
2024-10-01 09:31:57 +00:00
Tagir Valeev
4f112c52a7
[java-dfa] ClassDef: remove isInheritor(superName); replace with other methods
...
GitOrigin-RevId: 0033d430c30b804d8afbac3ea80938ed1130d17d
2024-10-01 08:57:46 +00:00
Tagir Valeev
394ba7023a
[kotlin-dfa] KTIJ-30856 Constant conditions: track implicit 'this' in extension methods properly
...
GitOrigin-RevId: 6c93d799b48b736757c5c1386b36f845fe63289d
2024-10-01 08:57:46 +00:00
Mikhail Pyltsin
f474d8047b
IJ-CR-145218 [java-inspections] IDEA-201932 Provide inspection to highlight redundant creation operations in java date time api
...
- combine into one inspection
- fix messages
GitOrigin-RevId: d4e064948f8c730c4d68c58e6c9b1277c6b66b4d
2024-09-27 17:12:29 +00:00
Mikhail Pyltsin
9eb0e15e2c
IJ-CR-145121 [java-inspections] IDEA-357009 new option to configure custom classes for IncorrectMessageFormatInspection
...
- fix table for `IncorrectMessageFormatInspection`
GitOrigin-RevId: 272d89fafaac63517e990b1d2808ec54d4c58e69
2024-09-27 09:33:50 +00:00
Tagir Valeev
ca9649997b
[java-inspections] Properly report 'not applicable on locals' warnings
...
IDEA-355699 Warning when annotating array elements as nullable with JSpecify
GitOrigin-RevId: ca9a3e0ea2ef3aa01d31afcaff2f92193af14dbe
2024-09-25 11:10:24 +00:00
Bas Leijdekkers
5b375ff7a2
Java: "'equals()' called on 'BigDecimal'" is no longer a cleanup tool (IDEA-354348)
...
sind replacing BigDecimal.equals() calls with BigDecimal.compareTo() calls slightly changes the semantics which can cause bugs
GitOrigin-RevId: 2a2d147b0953e1616e028ada8d7de369fe3da0b1
2024-09-24 20:21:56 +00:00
Aleksey Dobrynin
df7529c232
[java, highlighting, jigsaw] find module descriptor: support exclusions IDEA-354700
...
GitOrigin-RevId: ee96fec82905611a18aec82fd8554f7fb7d1dbb2
2024-09-24 14:48:18 +00:00
Aleksey Dobrynin
99c228c466
[java, highlighting, jigsaw] standardize an error message for conflicting packages
...
GitOrigin-RevId: 47d26dd0242ad7c5c533c232897d2c7486fb1dca
2024-09-24 10:23:55 +00:00
Bas Leijdekkers
c3189981f6
Java: accept more patterns (IJ-CR-144289)
...
GitOrigin-RevId: c0692f8c924b32988ec98aae86c1ad9b466cb45a
2024-09-24 10:04:30 +00:00
Mikhail Pyltsin
f73a4d96be
[java-inspections] IDEA-201932 Provide inspection to highlight redundant creation operations in java date time api
...
GitOrigin-RevId: 6b246167dda52272122d356c3f6a787eab5a2542
2024-09-20 14:10:17 +00:00
Tagir Valeev
c3ecaaa190
[java-dfa] More annotations; annotations for comparators; warn on nullity violation from methodref return
...
GitOrigin-RevId: d0b1a4967d361f409d4d25562c595e2812fc8044
2024-09-19 19:06:26 +00:00
Mikhail Pyltsin
abb1899900
[java-inspections] IDEA-357009 new option to configure custom classes for IncorrectMessageFormatInspection
...
GitOrigin-RevId: ab026ee405f78ff29519afb0db62449a682b5bd3
2024-09-19 12:20:53 +00:00
Tagir Valeev
35c9c6ca5a
[java-dfa] Basic support for Unmodifiable type annotation
...
GitOrigin-RevId: 4bc07e2533efa45356ba26b89c065b453a40d253
2024-09-18 20:27:35 +00:00
Tagir Valeev
ffd5d01482
[java-dfa] Type annotations for stream collectors; now, special processing of non-null collections is unnecessary
...
Part of IDEA-231901 Support TYPE_USE in external annotations
GitOrigin-RevId: 34e116eddf5dbc90468311e5fd2d0c30e600fc1a
2024-09-18 20:27:35 +00:00
Tagir Valeev
b50767f679
[java] Basic support for external type annotations
...
Only in XML directly; no editing UI for now; no inlays for now; only for libraries (Cls), currently no intent to extend to sources (Psi)
Part of IDEA-231901 Support TYPE_USE in external annotations
GitOrigin-RevId: 672ed09f57ffc40b61e8fe4dd33d0f9acdac92dc
2024-09-18 20:06:30 +00:00
Tagir Valeev
528b777e4a
[java-dfa] ControlFlowAnalyzer: do not compare PsiType by ==
...
GitOrigin-RevId: c24b6038b522eddefc8defbbddb59015bd90ae2e
2024-09-18 12:08:09 +00:00