Commit Graph

6209 Commits

Author SHA1 Message Date
Nikolay Chashnikov
3d6b5d2c09 [java] "Redundant ScheduledForRemoval annotation" inspection: don't show warning if 'inVersion' attribute is specified
It isn't possible to specify version where removal is planned via Deprecated annotation (IJ-CR-20718).

GitOrigin-RevId: 2f524b26c7d5d41ad0c251e52cd9ecead1fde54b
2022-02-16 14:03:17 +00:00
Nikolay Chashnikov
5c6c62d06e [java] move "Redundant ScheduledForRemoval annotation" inspection from DevKit to Java plugin (IDEA-288544)
The inspection may be useful in not only plugin projects (IJ-CR-20718).

GitOrigin-RevId: ec44c7485b25bba14384fda8adf3ea3f0be6fbd9
2022-02-16 14:03:16 +00:00
Gregory.Shrago
1c61e531af IDEA-288818 make index check hashed key equality for all clients
GitOrigin-RevId: f4900beb1828322740ca955afc7e771f164cf62e
2022-02-16 10:51:02 +00:00
Tagir Valeev
3909381f18 Remove redundant modifiers
GitOrigin-RevId: 55dd69efb00c53f654570d9e805f6bac4c8efefb
2022-02-16 09:35:26 +00:00
Andrey.Cherkasov
902218e74e [java-intentions] Don't suggest explicit type for uninitialized 'var' based on the first assignment for some cases
IDEA-287483

GitOrigin-RevId: dacfe4fa838c30e651f0244801b381b5fdb0df7f
2022-02-16 06:11:35 +00:00
Anna Kozlova
1ef2831f17 [deprecated] add option to ignore deprecated for removal inside project (IDEA-288824)
GitOrigin-RevId: 8153518d17436a6675bf154184debdf1f88ec542
2022-02-15 17:27:39 +00:00
Anna Kozlova
b3cd2cb11e [java] [refactorings] simplify dependencies
GitOrigin-RevId: b9fdf3048b7d126a7d8187cbd21aba6607c65013
2022-02-15 13:14:37 +00:00
Tagir Valeev
b2fd2611de [java-dfa] getArrayElementValue: fix unboxing Object[] arrays
Fixes IDEA-288566 Wrong warning at array element instanceof when it was autoboxed

GitOrigin-RevId: f4c1a4bceca84db8842541ed0468af8785a839c7
2022-02-14 13:37:50 +00:00
Nikolay Chashnikov
434a22cfc5 [java] cleanup: use StreamEx to simplify code (IJ-CR-20712)
GitOrigin-RevId: c27635ad12859e6977ea3473a6993f5df72cbfc0
2022-02-14 10:22:53 +00:00
Nikolay Chashnikov
abc373560d [API] replace ApiStatus.ScheduledForRemoval annotation by 'forRemoval' attribute (IDEA-288466)
Since we don't want to specify planned removal date anymore, there is no need to use a separate annotation.

GitOrigin-RevId: a047c55475e0f4752a2842577e094fb041c6c05b
2022-02-11 15:12:14 +00:00
Anna Kozlova
0a3d001b76 [java] avoid reformat inside psi operation (IDEA-287332)
GitOrigin-RevId: 387a7fe6e41da1f967b05dfa7da246e70e02b30f
2022-02-11 09:33:24 +00:00
Nikolay Chashnikov
9c66641799 [java] remove redundant import when "Remove annotation" quick fix is applied (IDEA-288488)
GitOrigin-RevId: 562cf18eafa636a761c75ae3e9630bdab3eff760
2022-02-11 09:25:51 +00:00
Tagir Valeev
32442ebe48 [java-inspections] IDEA-288528 Add a quick-fix to correct typeuse nullability annotation
GitOrigin-RevId: ac4d271bc6e43306532d201e74fcf6e9f7b2e6ae
2022-02-11 08:30:20 +00:00
Anna Kozlova
8bb3536c11 [java] effectively final: ensure checks are performed on the same variable
GitOrigin-RevId: 77dc60e5a5119eecdd73268e192bd52390dff342
2022-02-10 14:42:24 +00:00
Alexey Kudravtsev
cdd12a1545 introduce convenience method in Access
GitOrigin-RevId: 71f47dec3cb1d1484bb708a4466896c7556cc7a9
2022-02-10 13:35:47 +00:00
Anna Kozlova
b7c7c0df91 [java] avoid references search during local analysis (IDEA-287957)
GitOrigin-RevId: 53aff074b9c544108735067963d8b642a31fe51c
2022-02-09 14:02:16 +00:00
Ilyas Selimov
4572835609 java [unused declaration] - switch on functional ref nodes
GitOrigin-RevId: b79fa6d91931bcc2c47f6f363f4a099736000d44
2022-02-09 12:40:24 +00:00
Alexey Kudravtsev
4f52f716e9 fix "wrong capitalization" warning
GitOrigin-RevId: 8a8d32350e3fde71c90c4b9342fa010e423d952e
2022-02-08 14:37:42 +00:00
Anna Kozlova
d7dbf79cb8 [java] local can be final: check class for resources (IDEA-288150)
GitOrigin-RevId: 1910c9203725e2c49fb56fc0c92121f5f56c99ce
2022-02-08 14:28:11 +00:00
Tagir Valeev
7dc1ba3f05 [java-dfa] Do not report nullable-to-unannotated for method references to library classes
The same was done for normal calls but not for method references
Fixes IDEA-287197 "Constant conditions & exceptions": The "Suggest @Nullable annotation..." option no longer supports Objects::requireNonNull method references.

GitOrigin-RevId: 42bf265d8ea1ce2a1ae1be519e2237e862e05492
2022-02-08 07:52:20 +00:00
Andrey.Cherkasov
7ce1003bd9 [java-highlighting] Provide fix for "The receiver name does not match the enclosing class type"
IDEA-273225

GitOrigin-RevId: aac09cbfcb60a1757c7b142ac888979148d4e7cc
2022-02-08 04:33:49 +00:00
Bas Leijdekkers
a4f9675fd1 [global inspections] care about reference from Kotlin class super type list (IDEA-288186)
GitOrigin-RevId: 89e8a1ac7db066c44f71860ea6f08e36a3c9d752
2022-02-07 18:48:11 +00:00
Ilyas Selimov
a49f889442 EA-443789 [patterns for switch] - removed @NotNull constraints for highlighting info
Error highlighting could be suppressed by HighlightInfoFilter.
For instance OutsidersPsiFileSupport.HighlightFilter hides highlighting warnings in the files
from a different revision and highlight info will be null then.

GitOrigin-RevId: 0dcf5aec042aac0af90077585f78e32a7db2234c
2022-02-07 11:13:19 +00:00
Tagir Valeev
81ada51ad8 [java-dfa] ControlFlowAnalyzer: add RESULT_OF instructions after inc/dec operations
GitOrigin-RevId: 87708d57b901ec3b9ba7bf75f525d800c4872cc2
2022-02-07 10:30:52 +00:00
Ilyas Selimov
f47870ae8a EA-447738 [patterns for switch] - handle the case when permits list contains unresolved reference type
GitOrigin-RevId: 5a0adb3d51d548f40771a336d3fcbe76305be524
2022-02-07 07:09:53 +00:00
Tagir Valeev
b435e4d4fe [java-highlighting] checkVarTypeApplicability: null check added
GitOrigin-RevId: a4a0545c3a66833f80eaddfcd51d6c60cdc5979f
2022-02-04 09:46:24 +00:00
Alexey Kudravtsev
b6d16be643 push language level query down to the background thread off the EDT to fix EA-251153 (plugin) - T: FileBasedIndexImpl.ensureUpToDate
GitOrigin-RevId: f56856ea66e1c00c3dd940b8329d6388a0874879
2022-02-01 15:28:24 +00:00
Tagir Valeev
453a00c310 [java-inspections] IDEA-287483 Suggest explicit type for uninitialized 'var', based on the first assignment
GitOrigin-RevId: 80fa9ecf09130d04c41d27ad40897ef24183e4e1
2022-01-28 10:05:00 +00:00
Tagir Valeev
eea5b2207e [java-dfa] Proper argument order for two-arg reduce
Fixes IDEA-287093 Stream.reduce inspection is incorrect

GitOrigin-RevId: 5534d52562a9c5b678e45ea4f9623b9260c17bf6
2022-01-28 10:04:57 +00:00
Anna Kozlova
4a300c672b [java] don't include fully qualified name in unresolved call messages (IDEA-282207)
GitOrigin-RevId: 3f22a64e3ab3173157368140af5d072e3cad2654
2022-01-28 07:21:30 +00:00
Alexey Kudravtsev
965f6c769c cleanup: method is identical to its super method
GitOrigin-RevId: 350ea63057fc436a3bcebed964228c43db8d5923
2022-01-27 13:29:12 +00:00
Roman Ivanov
46bb1ca3ea [java] move refactoring to separate module
GitOrigin-RevId: 8de4efc815830feaddd1a686f00a885a428461c0
2022-01-27 12:57:22 +00:00
Roman Ivanov
e2e0889169 [java] more inspections moved to separate module
GitOrigin-RevId: 766ce3bb72c8c8c9a2b0c34bcea935212fd2f50a
2022-01-27 01:18:26 +00:00
Bas Leijdekkers
5feb0b5a8b [global inspections] remove unneeded assertion
GitOrigin-RevId: 1b4f1b7ea7679d1adcf43f3bac15d2d3296c2e77
2022-01-25 09:55:30 +00:00
Bas Leijdekkers
8e71b6ca0d [global inspections] remove unneeded parameters and introduce variable to simplify code
GitOrigin-RevId: 6f5f4469960ef4291e6d1438d6ef710cb1307e95
2022-01-25 09:55:28 +00:00
Ilyas Selimov
1d4479587c java [DFA] - fixed random switch label reachability report
GitOrigin-RevId: 215df3ffcf0e3076e63a9d87d429f2216e23a070
2022-01-25 09:25:25 +00:00
Andrey.Cherkasov
352e14cad0 [java-highlighting] Fixes after review (IJ-CR-19779)
GitOrigin-RevId: 052a555e3b2af3a687e37f7c912d79861673969c
2022-01-25 01:36:11 +00:00
Ilyas Selimov
3d5bbea95f IDEA-283367 - [Patterns for switch] - fixed completeness for parameterized sealed hierarchies
GitOrigin-RevId: 4f5c59fe1e38b08f86974682b8adf7d70f0274b5
2022-01-24 12:28:36 +00:00
Ilyas Selimov
4011c84778 IDEA-283367 - [Patterns for switch] - implemented "any pattern is dominated over const label element"
GitOrigin-RevId: f6e6c9214ad854fa0506e587f43075fabaf8e979
2022-01-24 12:28:33 +00:00
Andrey.Cherkasov
4d9d8fae07 [java-highlighting] Fixes after review (IJ-CR-19779)
GitOrigin-RevId: 3d99584386b55a8e20c4914cd054db4e0d6c2b62
2022-01-21 06:19:57 +00:00
Andrey.Cherkasov
c661a5b334 [java-highlightings] Use package-private access instead of public (IJ-CR-19483)
GitOrigin-RevId: 27a3b3ae0f4e2405fd8848de357bdca494829a2f
2022-01-21 06:19:55 +00:00
Alexey Kudravtsev
1828479d17 refine IDEA-284880: do not run Kotlin error highlighting/Java HighlightVisitorImpl during essential highlighting, but do run JavaNamesHighlightingVisitor/Kotlin names highlighting
GitOrigin-RevId: 2ea4b2ef0f5ddb2e8efb193c2c5798942dfea962
2022-01-20 13:23:43 +00:00
Anna Kozlova
8697bd962c [inspections] additional logging
GitOrigin-RevId: dcfc04ee81356d9a619d057401317afb5bda9c47
2022-01-19 19:15:51 +00:00
Ilyas Selimov
c7d80fb16a [java unused declaration] - excluded functional ref node out of the graph
GitOrigin-RevId: 28ca95ff4709b8c7466abee73054d1bbb52ee28a
2022-01-19 08:40:35 +00:00
Anna Kozlova
aa026b50f3 CCE
GitOrigin-RevId: 83de035ff519b7d9a43d2313321ec395bd691af0
2022-01-19 07:21:08 +00:00
Tagir Valeev
ff5d33a8c6 [java-analysis] Avoid inference for play.db.jpa.GenericModel
Fixes IDEA-285334 Incorrect contract inference for Play framework class leads to wrong nullability warning

GitOrigin-RevId: 3a50cd2ec26fe451a3d9813ae451558205ba7d6e
2022-01-19 04:28:26 +00:00
Andrey.Cherkasov
7524dc20ff [java-highlightings] Provide missed fix to fix containing method return type for conditional return
IDEA-256730

GitOrigin-RevId: 98a8befb15c2b571d1020d34018d88a60b952363
2022-01-19 04:16:49 +00:00
Andrey.Cherkasov
381684d2b2 [java-highlightings] Don't propose fix making return type void for method calls in conditional expressions branches
IDEA-256730

GitOrigin-RevId: 2953a47102a15fa572ac8271edb9bb0fe7c2f49e
2022-01-19 04:16:47 +00:00
Andrey.Cherkasov
bbd337ff8f [java-highlightings] Rename method and make it public
IDEA-257275
IJ-CR-19483

GitOrigin-RevId: 0989fc851ac558502b330f0df0a7d0cf86fb000e
2022-01-19 04:16:46 +00:00
Andrey.Cherkasov
b09fec3077 [java-highlightings] Refactoring: invert 'if' conditions
GitOrigin-RevId: 83d5d35ef22385b3e3b31d77ba0df974843d7307
2022-01-19 04:16:44 +00:00