Commit Graph

84 Commits

Author SHA1 Message Date
Marat Dinmukhametov
69e76fd301 [http-client, microservices-jvm] IJPL-179625 The URL part of MicroservicesJvm was moved to Java
Because HttpClient will be in Android Studio. It needs access to this API to have implementations of HTTP clients (Ktor, Retrofit, OkHttp) in Android Studio.

(cherry picked from commit 30771b08ec0a1642ca010cde8513703abc0f7b0f)

IJ-CR-163057

GitOrigin-RevId: 20a144d0b6e80b44296471e134dac001daef37e6
2025-05-23 19:02:20 +00:00
Tagir Valeev
fff1c6af0c [java-analysis] ClassDataIndexer: provide an extension to register custom file suppressors
Should help BAZEL-852 IntelliJ incorrectly infers "Contract(pure = true)" annotations for methods from ijar-s produced by Bazel

GitOrigin-RevId: 2fdfc9166737d0aba84372a5a2d127aeeb747f9d
2025-02-18 09:36:18 +00:00
Tagir Valeev
a0f777069b [java-highlighting] move module-related warnings to JavaModuleDefinitionInspection
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 66179a41da5e02b759f07f9d6638b87711181348
2025-02-17 12:04:21 +00:00
Aleksey Dobrynin
d41422ac8f [java, import-module] Replace 'import module' with class imports in module-info.java (IDEA-367505)
GitOrigin-RevId: 8a0ba58ca14698f553fdd6baf132d00d7ba0e504
2025-02-14 01:09:59 +00:00
Tagir Valeev
65dbbd5a3a [java-highlighting] refactor MultiReleaseUtil.kt; merge with JavaMultiReleaseUtil
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 05487a43bb4277cef0d96ecf9f6fce789d292091
2025-02-13 16:25:21 +00:00
Michail Plushnikov
4a760237af [lombok] IDEA-279512 Prevent false-positive for Local variable or parameter can be final inspection with lombok.val
GitOrigin-RevId: 9e4f945cf982e8099fcf626565babc576544d7a3
2025-02-11 23:24:15 +00:00
Dmitry Kichinsky
290d42517d [maven] IDEA-255308 introduce MultiReleaseSupport extension
GitOrigin-RevId: 8652a6d5cf88b36272e18f574ce00be6878976af
2025-02-01 15:29:32 +00:00
Tagir Valeev
c7edfdbe4a [java-highlighting] SafeVarargs checks -> AnnotationChecker
Also, warnings are moved out to inspections
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 2292723fde787454467307c213ea38e730aa0ff5
2025-01-08 16:42:47 +00:00
Bas Leijdekkers
2d7e9aec9c Java: report implicit assignment or return of record components with mutable type (IDEA-325828)
GitOrigin-RevId: f7b7091c291db33468bb60b22cab01dc11aca586
2024-12-29 13:41:59 +00:00
Mikhail Pyltsin
1fa30df2e4 [java-inspection] IDEA-364384 'Non-constant string as argument to ...' logging call has no quick fix if logger is returned from another method
GitOrigin-RevId: f33aa6b47a420fe610a440fd4321826a7a43452f
2024-12-27 16:44:32 +00:00
Yuriy Artamonov
e2d6af6765 [java] Suppress non-code annotations line marker on Java toString()
Object.toString() supposed to have the standard contract, and there is no real need to add explicit annotations there. This shrinks gutter width in final classes a bit.

GitOrigin-RevId: 1c06db7412603a145b9bc888ec6bf52bfedbb420
2024-12-21 08:58:41 +00:00
Mikhail Pyltsin
94efe9cb4d [java-completion] IDEA-359174 command completion
- add new actions: getter/setter/find usages, introduce variable
- fix set of actions

GitOrigin-RevId: 9f733d5b38cb8333c3c83e1a0f3d8ea43d7bcbb1
2024-12-03 21:33:19 +00:00
Tagir Valeev
da09d6373a [java-intentions] Remove redundant properties
GitOrigin-RevId: 934b84c1f3ee9e14e665fdaf267000cc0e946c07
2024-12-03 14:25:33 +00:00
Vladimir Krivosheev
57a3174bf0 move resources to existing resources root
GitOrigin-RevId: 78997483cfe62983f667d27b6d03220e697cdb45
2024-11-23 08:09:44 +00:00
Bas Leijdekkers
a016f884d3 Java: add error for class extending sealed class from another package (IDEA-358672)
GitOrigin-RevId: d7b0c68100ddc60f42bfedc1f3b88e54cbd3ce74
2024-10-29 01:52:20 +00:00
Tagir Valeev
dd15592444 [java-inspections] Refactor and improve MismatchedCollectionQueryUpdate
1. Track separately updates that have no effect on empty collection
2. Extract MismatchedQueryUpdateRunner to avoid lots of arguments
3. Make QueryUpdateInfo immutable record
4. Track variables containing derived collections
5. Track iterators as derived collections

Fixes IDEA-356315 Incorrect suggestion of Stream.toList() when followed by Iterator.remove()

GitOrigin-RevId: 3b7fd99b2310f123e924034f7c623bd01e4e4c40
2024-10-21 17:40:32 +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
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
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
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
ac0c57748b [java-inspections] IDEA-346005 Add new inspection: Unnecessary keySet() call
GitOrigin-RevId: d1f1db0ae939017a8550b91cd8742dc222a8db99
2024-09-17 07:28:39 +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
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
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
Bas Leijdekkers
7db980cfcf Java: remove unneeded ':' from inspection problem report
GitOrigin-RevId: 9b0c070c8ca2a883d0d07f0064b67f22594cbced
2024-08-21 09:12:08 +00:00
Bas Leijdekkers
bd7f1f4270 Java: proper order of 'true' and 'false' in quick-fix name (IDEA-357973)
also fixes internationalization and the incorrect comma in the name
for "Create missing switch branches" quick-fix

GitOrigin-RevId: 16285e054447d8d15318df8889499bbbf91243a7
2024-08-21 09:12:08 +00:00
Mikhail Pyltsin
c56e5e7313 [java-inspections] IDEA-357725 LoggerInitializedWithForeignClassInspection should skip when the logger is the final field
GitOrigin-RevId: e910d9bb094f058c363148a3d08b695276bcc2c6
2024-08-15 18:02:00 +00:00
Mathias Boulay
abd7b1dded fix(JDoc): Formatting and inspections issues
GitOrigin-RevId: 910e9b3335fa7c3967fb79893ecba7c69595a201
2024-08-14 18:24:38 +00:00
Bas Leijdekkers
f40ed914fb Java: fix "Missorted modifiers" options and messages
GitOrigin-RevId: ab41b6c1d135c9b788feeec4a273a6f483b9bfa5
2024-08-12 13:37:26 +00:00
Mikhail Pyltsin
cb37003541 [java-inspections] IDEA-357323 Propose case null during adding all cases
GitOrigin-RevId: 6d7ffccc28d64ed0f52db0235c41796d1d81284e
2024-08-09 11:00:42 +00:00
Bas Leijdekkers
91cff4a4f1 Java: inspection for migration to Markdown documentation comments (IDEA-357191)
GitOrigin-RevId: 94d6c21d713073df58e2f6fb2bbd348a7039b9ce
2024-08-08 20:19:46 +00:00
Bas Leijdekkers
488e4a01bf Java: grammar
GitOrigin-RevId: 2fa00e04420bd0fb6a4826ccf35570c5ae017126
2024-08-08 20:19:46 +00:00
Tagir Valeev
3521c7ac6c [java-inspections] EqualsWithItselfInspection: fix description (IDEA-355789)
GitOrigin-RevId: ce48c8a535717b2b433078f43909b2f28084d360
2024-07-26 11:03:19 +00:00
Mikhail Pyltsin
0b30038602 [java-highlighting] IDEA-356470 Support jep 455. Generate true and false cases for boolean selector
GitOrigin-RevId: fbd879f172639f3db1b0d9c12f98fcb3868fa1a9
2024-07-18 20:11:33 +00:00
Tagir Valeev
d52f6c789f [java-dfa] IDEA-355908 Add new mutation contract option: io
GitOrigin-RevId: 206fae268d8444d475a4feac6ebc5ef96ffc57bb
2024-07-04 21:05:23 +00:00
Tagir Valeev
a90638139a [java-inspections] IDEA-355789 'equals()' called on itself: disable for comparator contract test
GitOrigin-RevId: e378fb4b0a2e76698f09c911bc2cce75abead793
2024-07-02 16:37:40 +00:00
Mikhail Pyltsin
09c7c9e6e8 IJPF-CR-23473 [java-generation] IDEA-344399 generate annotation based on type_use option
-fix wording

GitOrigin-RevId: d29bb07acb1c739a3fc5d7563b89b6c52d5bfec2
2024-06-21 18:07:32 +00:00
Mikhail Pyltsin
2023228d8c [java-generation] IDEA-344399 generate annotation based on type_use option
- extracted new option
- reuse this option in MissortedModifiersInspection
- override uses this option too

GitOrigin-RevId: 39f3f72991240753c86c7f80df865728aa9743ad
2024-06-17 21:14:57 +00:00
Mikhail Pyltsin
7e047434f3 IJ-CR-130369 [java-inspections] IDEA-197280 Non-constant string concatenation as argument" could also be triggered for String.format
- change description

GitOrigin-RevId: 0924d1165a47e2d40f3b245adfdc8252f2768f25
2024-05-24 21:18:23 +00:00
Tagir Valeev
5cc297d7ea [java-inspections] IDEA-353938 Report ignored object allocations inside method references
GitOrigin-RevId: 1261b9bdb64bec0269fe7d0ffb2ac634e1494e81
2024-05-23 11:08:49 +00:00
Tagir Valeev
f6abeeb22f [java-inspections] Rename 'if' statement with identical branches inspection to avoid confusion
GitOrigin-RevId: 9bb40bf9b593744130c17c5b0cc14d7c67740729
2024-05-13 13:49:05 +00:00
Bas Leijdekkers
cfbb00fa01 java: improve some inspection texts
GitOrigin-RevId: 5a0670e84850599d8107f206b76eee1f8f84de17
2024-04-25 13:49:54 +00:00
Mikhail Pyltsin
0e4caec126 [java-inspections] IDEA-337706 Support conversion System.out to log calls
- fix quick-fix message

GitOrigin-RevId: 0e81b3efffaa4af7fb739b72ee232ea68665a40e
2024-04-14 18:41:14 +00:00
Mikhail Pyltsin
d8f8800d93 IJ-CR-131028 [java-inspection] IDEA-310469 Java inspection for "Pattern variable can be used" does not find all cases
- rename option

GitOrigin-RevId: 26dc0cfa17c438aa8e41fcc9d52d764573814021
2024-04-14 18:28:41 +00:00
Bas Leijdekkers
0b1872f794 java: report string.toCharArray().length -> string.length() (IDEA-351174)
for "Redundant 'String' operation" inspection

GitOrigin-RevId: 96c3b5d310b9639c74241f48348257bbb83dbe93
2024-04-11 09:52:00 +00:00
Mikhail Pyltsin
00351758c5 [java-inspection] IDEA-310469 Java inspection for "Pattern variable can be used" does not find all cases
- support more cases

GitOrigin-RevId: 28301b79d4c4acd343a35474d1ab44096dcea8cd
2024-04-09 15:49:16 +00:00
Bas Leijdekkers
bcbd01ca20 [java] ignore non-serializable fields in enums (IDEA-274137)
GitOrigin-RevId: 2268d012377931be155463a846f7a257208d7e1d
2024-04-08 09:55:33 +00:00
Mikhail Pyltsin
77cac2bb83 [java-inspections] IDEA-337706 Support conversion System.out to log calls
- quickfix for SystemOutErrInspection and ThrowablePrintedToSystemOutInspection
- StringConcatenationArgumentToLogCallInspection now uses String.valueOf for one argument (exception type)
- SystemOutErrInspection has info level
- ConvertSystemOutToLogCallFix doesn't highlight ThrowablePrintedToSystemOutInspection's problems

GitOrigin-RevId: f611e6ccb0e15e5b806ed776b88b12b097d3bb5d
2024-04-03 11:41:32 +00:00
Mikhail Pyltsin
a750ec4eb0 [java-inspections] IDEA-197280 Non-constant string concatenation as argument" could also be triggered for String.format
- Support simple cases for String.format
- Support simple cases for MessageFormat.format

GitOrigin-RevId: 50f52f526923950e30746691414bb89ce5fca5ab
2024-03-29 18:34:16 +00:00