Commit Graph

7859 Commits

Author SHA1 Message Date
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
Tagir Valeev
0ddb0d84b3 [java-analysis] JavaSourceInference.isUnusedInAnonymousClass: avoid using heavy search
GitOrigin-RevId: 2fd2f4c0a0109db9cc91e5c49c5fa832b9ec90ed
2024-09-18 12:07:43 +00:00
Tagir Valeev
ac0c57748b [java-inspections] IDEA-346005 Add new inspection: Unnecessary keySet() call
GitOrigin-RevId: d1f1db0ae939017a8550b91cd8742dc222a8db99
2024-09-17 07:28:39 +00:00
Tagir Valeev
05de6a6bdb Less raw types
GitOrigin-RevId: 2a6e712b4017cf1ead7870543e562acb654fbeaf
2024-09-16 11:23:15 +00:00
Yuriy Artamonov
47f1c44a90 [java] IJPL-158521 Actions: fix ellipsis in messages for Java actions
GitOrigin-RevId: bfce0d6efa8747660c4b9af3d8defbfa47e4509a
2024-09-15 14:50:09 +00:00
Alexey Kudravtsev
401bcbb8ef optimization: do not allocate empty maps
GitOrigin-RevId: 77883bfa5f82626a8b116ee9ce72752e70a1f313
2024-09-13 22:48:02 +00:00
Bas Leijdekkers
5c06f74975 Java: don't report non-private field as assigned not accessed when it is implicitly read and written (IDEA-357404)
GitOrigin-RevId: 943ef6961c19510e5d4291367293424a87499487
2024-09-13 16:40:26 +00:00
Aleksey Dobrynin
f590114d83 [java, highlighting] Fix module conflict highlighting for exported packages IDEA-352819
GitOrigin-RevId: d4479fb863280674ae8960c930e6e8b1628b7321
2024-09-13 06:24:34 +00:00
Alexey Kudravtsev
a7c08af12a optimization: do not recalculate hashCode of 10K+-sized lists on each typing, do not store them in the map keys (part of KTIJ-27513 K2 IDE: Slow reference search for specific symbols in unused symbol inspection)
GitOrigin-RevId: 62930faef52b3b5039e7f20720de5970a22d943e
2024-09-12 14:15:42 +00:00
Tagir Valeev
41c0081fd8 [java-dfa] Work-around K2 problem KT-71407 K2: Do not report @JvmField default value as PsiField initializer in K2
GitOrigin-RevId: 1cdf4ac181c63cf9e0d348c7e4b48d449cc031c2
2024-09-11 20:52:54 +00:00
Michail Plushnikov
6ebc72d816 [lombok] IDEA-345991 Fix Error Highlighting: Lombok Builder.Default on Final Fields
GitOrigin-RevId: 839bffdf12b4c5046ed8ec0732bfce9f09801516
2024-09-10 23:11:10 +00:00
Bas Leijdekkers
9eb3b6bb58 Java: introduce another visitSwitchBlock() method
GitOrigin-RevId: 97f3edcab34837c124e1426d97a6d6590e67a053
2024-09-06 13:43:06 +00:00
Bas Leijdekkers
028d526405 Java: fix false positive when using java 21 pattern matching (IDEA-357175)
in "'equals()' should check the class of its parameter" inspection

GitOrigin-RevId: f84071ea339bf690eadcba60d491eebe4cb21a7e
2024-09-05 15:02:58 +00:00
Mikhail Pyltsin
7a9b0a636a [java] IDEA-358431 Support MessageFormat specifier-to-argument navigation, similar to String.format
- fix place for formatted index (without style)

GitOrigin-RevId: aa82d7312bab57ce7b2dc736456574746da5fd9d
2024-09-05 12:57:16 +00:00
Max Medvedev
e54b7f9eb7 IJPL-797 intellij.platform.analysis.impl don't expose Int2IntMap in API
GitOrigin-RevId: 729a4c894919858c1c60dde419fc4d7cbe111c5c
2024-09-04 17:23:17 +00:00
Tagir Valeev
3c7271ac4e [java-inspections] DuplicateExpressions: recognize stable methods from GetterDescriptor; add some methods from java.io.File
Fixes to some extent IDEA-114778 IntelliJ: add "locate multiple occurrence"

GitOrigin-RevId: a20d9db31a79cdc963075993a09a6a6115947621
2024-09-02 21:50:32 +00:00
Tagir Valeev
49f0880f57 [java] IDEA-358431 Support MessageFormat specifier-to-argument navigation, similar to String.format
GitOrigin-RevId: 5bfb87b48e714f92f5c469d4110426ff76f8c14b
2024-09-02 21:01:25 +00:00
Daniil Ovchinnikov
c3cebbf8dd move ExperimentalUI to intellij.platform.core.ui
GitOrigin-RevId: 9bf55dab6a2d5c0be392634dd31b18efaf401b45
2024-09-02 19:10:22 +00:00
Mikhail Pyltsin
dd822c1bc7 IJ-CR-142710 [java-inspections] IDEA-357725 LoggerInitializedWithForeignClassInspection should skip when the logger is not the final field
- fix texts

GitOrigin-RevId: 85d86f362ce860118d2a047321bf4916e01757da
2024-09-02 18:36:41 +00:00
Mathias Boulay
d4e45d6061 tweak(JavaDoc): Disable some inspections on older javadoc
Some inspections are pointless to check, related to javadoc tags.

GitOrigin-RevId: b7bb8bba4b51f1d90678705af3da8e5e5c4a4907
2024-09-02 16:39:21 +00:00
Tagir Valeev
5abb2bda0d [java-analysis] VariableAccessUtils.getVariableReferences: do not query LocalRefUseInfo for non-physical files
Non-physical copies are usually created for a single purpose (completion, or a single ModCommand quick-fix to apply), so computing all the references is likely not useful and only creates performance overhead.
Should fix IDEA-357624 Slow code completion in large Java file in lines being assigned to "final var"

GitOrigin-RevId: c942fb2a91bd3bcbd4cb67d48f2801e256ab64a1
2024-09-02 12:18:12 +00:00
Bas Leijdekkers
f198a23cdf Java: don't evaluate enum constants as constants expressions
GitOrigin-RevId: c5d703ce78b569a3bdab9e8e9dcc2e95bdadd07f
2024-08-29 19:03:09 +00:00
Bas Leijdekkers
8827db8d65 Java: remove enum functionality from constant evaluator
GitOrigin-RevId: edcb80e7ddeee3a45b83c98cf77f3c56fd850298
2024-08-29 19:03:09 +00:00
Tagir Valeev
07c73fd64a [java-dfa] Recognize String.strip/stripLeading/stripTrailing/isBlank
Also: limit the length of the resulting string if the length of the original string is known

GitOrigin-RevId: bfe3752b15949047366c3d3d79c7d13a49193abd
2024-08-29 14:08:22 +00:00
Tagir Valeev
59325634ab [java-inspections] IDEA-356832 Inspections ignore redundant Class::cast method call
GitOrigin-RevId: 390a19d69020bc91f1395e6c4d23f14992ca396b
2024-08-28 17:54:26 +00:00
Tagir Valeev
646b6ff3d1 [java] VariableNameGenerator: contracts
GitOrigin-RevId: f22a0ac01694934f291d31f0322f4c01d271418e
2024-08-28 17:54:26 +00:00