Vladimir Krivosheev
cc667842f7
IJ-CR-146078 do not export intellij.platform.ide.impl
...
GitOrigin-RevId: 16a29b914bf81d4d5e3cdb43c64b088113a2fcd4
2024-12-30 10:16:07 +00:00
Vladimir Krivosheev
25233df1b1
cleanup - isEmpty
...
GitOrigin-RevId: 100d69abb6a423556574a72e82508fdb8f5d7fa3
2024-12-27 14:41:14 +00:00
Vladimir Krivosheev
051ed2529b
cleanup
...
GitOrigin-RevId: 6fa4f979e0a6641885e2225eb985b13713373ac5
2024-12-26 14:56:01 +00:00
Mikhail Pyltsin
1c5efb8d49
[java-inspections] IJ-CR-152124 IDEA-365031 Propose on info level convert to record for classes without getters
...
- conditions simplified
GitOrigin-RevId: 6288c1b6cba0503a0416abb4216c99a509ff0467
2024-12-26 10:30:16 +00:00
Mikhail Pyltsin
aff3d50d2b
[java-inspections] IDEA-365031 Propose on info level convert to record for classes without getters
...
GitOrigin-RevId: 393cf32c1fa1e1279d40b3444663b3c721bc2b80
2024-12-24 10:53:08 +00:00
Vladimir Krivosheev
7b4c77396e
do not export deps blindly (part 5)
...
GitOrigin-RevId: 48daba2ea218703ecd0f60b5b12cc813c8802338
2024-12-23 20:43:00 +00:00
Mikhail Pyltsin
d3e75c5951
[java-inspections] IDEA-365031 Propose on info level convert to record for classes without getters
...
GitOrigin-RevId: 77f56876a99f3e924bf39232f9cf5a32fb174211
2024-12-20 13:34:02 +00:00
Bas Leijdekkers
2b32d9bb56
Java: basic support for Valhalla Value Classes (IDEA-364548)
...
GitOrigin-RevId: 93b0394866aae35772ccc90e7de822af8a94c6ce
2024-12-18 18:05:29 +00:00
Vladimir Krivosheev
98799639aa
do not use _test as lib - test targets do not support this
...
GitOrigin-RevId: f2f49db4294b6a64040dbbd5f1d95e972cbd70a3
2024-12-15 18:32:30 +00:00
Mikhail Pyltsin
fec8a2de9c
[java-completion] IDEA-359174 command completion
...
- new implementation for quick-fixes
GitOrigin-RevId: 82cbad4e1de9eaa089027325d28bb0774ecd05b8
2024-12-14 13:31:08 +00:00
Tagir Valeev
8e0a1613f1
[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
GitOrigin-RevId: 0818188d2e5ae25916c0433dfe976c808eebf869
2024-12-09 16:26:42 +00:00
Mikhail Pyltsin
3c78fe69e6
[java-inspections] IDEA-363980 Support JEP 495. Update ImplicitToExplicit /ExplicitToImplicit inspections
...
- tests
GitOrigin-RevId: 946428cb5f8e397625acbec9446d731fb0550225
2024-12-06 19:03:38 +00:00
Bartek Pacia
5569a2965d
[java-inspections] IDEA-14669 fixed: suggest adding specific non-null assertions from test frameworks
...
(cherry picked from commit 0d22d640ea4ee77a6bdfb5b4af504332e7456b68)
IJ-MR-150371
GitOrigin-RevId: 04a5fe47cf874ae78c5ad73282b55123f55e84cb
2024-12-05 12:35:38 +00:00
Bartek Pacia
921e136028
[java-inspections] IDEA-352426 'Boolean.TRUE.equals(boolean)' should be simplified
...
fixed IDEA-352426
(cherry picked from commit a7570cc68be64a4d115a4683b1ccb0136cf713d7)
IJ-MR-150641
GitOrigin-RevId: 41c89166f7b988267f01834fdf79e8f4e12cf896
2024-12-05 01:26:24 +00:00
Mikhail Pyltsin
13e4c24bba
[java-inspections] IDEA-364128 Inspection PatternVariableCanBeUsedInspection shouldn't propose converting for variable
...
- skip cast for variables
- not extend parameters for cast
GitOrigin-RevId: 6eb3a63d923fd1625c2c593afb65ce5762a1c0e4
2024-12-02 14:36:32 +00:00
Vladimir Krivosheev
8c77c9ed84
don't export ide.core.impl from lang-impl
...
GitOrigin-RevId: 029fef0995b0d8e6b684f463bdd856dd17021366
2024-12-02 11:32:59 +00:00
Alexey Kudravtsev
3215d88629
remove usages of deprecated immutableSet
...
GitOrigin-RevId: 412c66898fa8af08406267ba73fbe7f108fd154c
2024-11-29 17:34:20 +00:00
Tagir Valeev
9d5757374f
[java-inspections] OverwrittenFieldAnalyzer: set initial field write anchor to prevent subtle bugs
...
GitOrigin-RevId: 5138540545f8553a96a4cad042ed87e71d223dd6
2024-11-29 17:30:18 +00:00
Tagir Valeev
9a8a33c1ab
[java-inspections] OverwrittenFieldAnalyzer: support SimpleAssignmentInstruction as well (for the future)
...
GitOrigin-RevId: 8414e70de9e52df87c3931071e1cf4c5d2bee2db
2024-11-29 17:30:18 +00:00
Bartek Pacia
6682d9efc3
[java-inspections] Non functional style Optional.isPresent - missed opportunity
...
IDEA-360860 fixed
* split tests into individual methods, to make debugging easier
* add javadoc for VariableAccessUtils#isVariableTypeChangeSafeForReference
(cherry picked from commit f6b3468079959f7adec737e0b8ec3ad1d97e7ad2)
IJ-MR-150176
GitOrigin-RevId: 4b430e49819c7cba1e08ecee47b881f05be570d4
2024-11-28 23:23:40 +00:00
Vladimir Krivosheev
17916c90f8
libraries -> lib, resources, opt-in, test deps
...
GitOrigin-RevId: db66ee95dcb0f0553b40c9cc56cd6afed8634cdd
2024-11-27 13:53:42 +00:00
Alexey Kudravtsev
9cef099839
propagate @Unmodifiable to more methods calling ContainerUtil, to enable data-flow inspection to highlight more warnings
...
GitOrigin-RevId: 01d3c976ffd35c3290433d0cd6c0f2d59df894f1
2024-11-27 12:57:34 +00:00
Tagir Valeev
6a6e2c2eca
[java-inspections] OverwrittenFieldAnalyzer: Fix branching and method call handling (IDEA-362869)
...
GitOrigin-RevId: 4695c81d99d13cec4d04d64c5c97a2837765eac8
2024-11-22 15:34:30 +00:00
Mikhail Pyltsin
5b7611c45e
[java-inspection] IDEA-310567 'Constant values' false positive for switch expression
...
- skip 'constant values' for switch expressions if they contain always failed methods
GitOrigin-RevId: 1207911bd11f94f37293254fa609e47b42aa96e1
2024-11-21 14:58:08 +00:00
Alexey Kudravtsev
6cb319cbbc
more immutable collections: mark transitive callees of ContainerUtil.filter() as Unmodifiable to help uncover "immutable is passed where mutable is expected" bugs via "data flow problems" inspection, fix some found bugs
...
GitOrigin-RevId: c9b57bd0bd8fadcbaf7cca373c2aefbf562ecd4b
2024-11-18 16:57:58 +00:00
Tagir Valeev
7ce8298401
[java-inspections] OverwrittenFieldAnalyzer: fix aliases handling (hopefully)
...
Part of IDEA-362869 Rewrite overwritten field analysis to real DFA implementation
GitOrigin-RevId: 0ded392733e7b070d14f9aea931203f8d2b72a35
2024-11-18 12:49:11 +00:00
Tagir Valeev
6d65197382
[java-inspections] OverwrittenFieldAnalyzer: fix return instruction interpretation
...
Fixes IDEA-363245 Data Flow Analysis: Stack corruption caused by lambda parameter (Stack is corrupted)
GitOrigin-RevId: afebc01b2c16239e3666827a2fdd7697d4b351de
2024-11-15 12:14:34 +00:00
Tagir Valeev
9439a38b6f
[java-inspections] SuspiciousNameCombinationInspection: exclude toUnsigned* methods
...
Fixes IDEA-360817 False-positive "suspicious variable/parameter name combination"
GitOrigin-RevId: 6e02686d5896a587335e1d03ce1480f9052024e5
2024-11-14 12:12:11 +00:00
Mikhail Pyltsin
3efe641c3b
IJ-CR-147991 [java-inspections] IDEA-360880 Replace cast expressions with pattern variable does nothing inside of ternary operator
...
- small renaming
GitOrigin-RevId: 168c183123ffc6e7817c408dc1e60744cbcd92da
2024-11-12 11:07:42 +00:00
Tagir Valeev
d7af3fc254
[java-inspections] IDEA-362869 Rewrite overwritten field analysis to real DFA implementation
...
GitOrigin-RevId: ab7069e7ba21a6bc64ae4a1cd395ede56fc4d346
2024-11-08 13:00:01 +00:00
Yann Cébron
c620143d0f
[devkit] InspectionDescriptionNotFoundInspection: suppress known false positives (IJPL-166089)
...
GitOrigin-RevId: cd9eee3c07139004c9e1d5b76d453e434efedfef
2024-11-05 16:50:38 +00:00
Tagir Valeev
0ca49293fa
[java-dfa] IDEA-361818 Make LiveVariableAnalyzer descriptor-based, rather than variable-based
...
GitOrigin-RevId: c3a8a029fe4e6f4c3ef7bdd67726ec4993cb3c80
2024-11-05 16:07:12 +00:00
Mikhail Pyltsin
8ff906ca0e
[java-inspections] IDEA-361878 'Replace with pattern variable' quick-fix changes semantic
...
- process super types
GitOrigin-RevId: e47d6266ef8579703d7209e2ad8dee472e68ab2d
2024-11-04 18:18:14 +00:00
Tagir Valeev
86985b9e35
[java-inspections] OverwrittenFieldAnalyzer: separate implementation from BaseVariableAnalyzer
...
Part of IDEA-361818 Make LiveVariableAnalyzer descriptor-based, rather than variable-based
GitOrigin-RevId: 0a30b0a2b47a1ede12e9cbd270b413140c580bf8
2024-10-31 09:31:54 +00:00
Mikhail Pyltsin
ff4d5ea6f4
[java-inspections] IDEA-359771 Replace cast expressions with pattern variable doesn't work in inner blocks
...
- go up and back recursively
GitOrigin-RevId: 22f7483909ce66511b129db5a24ebe1af3dce450
2024-10-29 21:15:20 +00:00
Mikhail Pyltsin
29c026eaf2
[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
GitOrigin-RevId: 2602190296988a80d54520c7a0f15fd0f8e3d942
2024-10-28 21:01:30 +00:00
Alexey Kudravtsev
3622cf6fce
highlighting diagnostics: more places to specify reason for restart
...
GitOrigin-RevId: 623a39346c47a04efc2f13076f8591b701554ee7
2024-10-28 13:30:39 +00:00
Nikolay Chashnikov
ebebd1d05e
[java] refactoring: throw IOException from ClassFileAnalyzer.processFile instead of logging it inside (IJPL-165190)
...
Calling code should deal with such exceptions.
GitOrigin-RevId: 1f6e9de4c7f9c320052877b8604e2ec5b8b289a6
2024-10-25 15:24:44 +00:00
Nikolay Chashnikov
107dc70d23
[java] extract API from AbstractDependencyVisitor (IJPL-165190)
...
JvmBytecodeAnalysis service is introduced here as an entry point to different functions which allow analyzing declarations and references in the bytecode. It makes it easier to use the API, and also allows adding functionality to process references to fields and methods (needed for IJPL-165190).
GitOrigin-RevId: 28d2659007ee38282676d583af7941988ad65d9a
2024-10-25 15:24:44 +00:00
Nikolay Chashnikov
3593db1779
[java] refactoring: move AbstractDependencyVisitor to a new package (IJPL-165190)
...
'com.intellij.codeInspection' package is a too generic for this functionality. This is the first step of extracting the proper API from AbstractDependencyVisitor.
GitOrigin-RevId: 8bb3b05b8bd0f9081655d088d6fafeefcb5a95b1
2024-10-25 15:24:44 +00:00
Alexey Kudravtsev
205b6a1710
mark results from ContainerUtil.union as @Unmodifiable to avoid accidental modifications
...
GitOrigin-RevId: 1d46c804f98711707829c49cf87a8212cbd2e220
2024-10-23 13:05:08 +00:00
Tagir Valeev
9bcd5c38ea
[java-inspections] JavaReflectionInvocationInspection: better message and range when number of arguments differs
...
Fixes IDEA-171801 Make "Reflective invocation arguments mismatch" more verbose
GitOrigin-RevId: 586b21e543959f53a082d6b0a1fdcb28c0f30039
2024-10-17 14:08:04 +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
066fa7fe85
[java-inspections] IDEA-360279 Narrow the scope for ImplicitToExplicitClassBackwardMigrationInspection
...
GitOrigin-RevId: 7d1e2b8da9983291201eb214f9437c68aaa12b87
2024-10-08 16:45:11 +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
1de7339d44
[java-inspections] Class can be record: automatically use accessors if the fields are not accessible
...
Fixes IDEA-356432 'Convert to record class' could handle public fields more intelligent
GitOrigin-RevId: c1c458275e808e3c95e2a24a9a8c1919ac25011b
2024-10-04 17:21:43 +00:00
Bas Leijdekkers
2f23d849ea
Java: fix "Duplicate branches in 'switch'" inspection false positive on method reference (IDEA-355483)
...
GitOrigin-RevId: 0d5e06632a349494f05b79dab40d37988fdd7412
2024-10-03 18:24:19 +00:00
Bas Leijdekkers
772de1b8c2
Java: cleanup in DuplicateBranchesInSwitchInspection
...
GitOrigin-RevId: b7adfb9113ed15f46b25da935b9ee9ec66af6fb8
2024-10-03 18:24:19 +00:00
Bas Leijdekkers
d74484e368
Java: enable "Record pattern can be used" by default at warning level (IDEA-359690)
...
and make it a cleanup tool.
GitOrigin-RevId: 3bb400491d44ab901660d900c6ce73e76bdf6261
2024-09-25 21:53:25 +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