Mikhail Pyltsin
45160db0df
[java-highlighting] IDEA-352588 Support JEP 455: highlighting for switch with primitives
...
GitOrigin-RevId: 06636352b202037ec3400b2f9763e101d8ed6042
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
8416740b8c
[java-dfa] Support JEP 455: IDEA-352186 dfa for primitives in patterns
...
GitOrigin-RevId: 2033b095f35f02222aa40f43d37e07b0019c4324
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
66f310ed19
[java-inspections] DFA widening is allowed in JDK21
...
GitOrigin-RevId: 4e79fb03a5a7b3e9454af956b19dd16b437c54b0
2024-04-24 11:16:03 +00:00
Tagir Valeev
053d59f113
[java-psi] Move JavaLexer utility methods to PsiUtil to make them accessible from java-psi-api
...
GitOrigin-RevId: 88a728c1d021f703dc9f882e1f9213cd8477ed7a
2024-04-19 17:41:51 +00:00
Tagir Valeev
29d3dd73c0
[java-inspections] OverwrittenFieldAnalyzer: do not build maps if there are no field accesses
...
GitOrigin-RevId: 08a36e2ca92e21fb42c8afca8b7a1880b1a6dcd3
2024-04-19 09:51:50 +00:00
Mikhail Pyltsin
74e210570e
[java] Pattern variable can be used mass cleanup
...
GitOrigin-RevId: 46452d7711435b63fca78af3a6f634bcec862139
2024-04-18 14:03:54 +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
Tagir Valeev
2ca2ae1758
[java-inspections] ReplaceInefficientStreamCountInspection: support cs.chars().count()
...
Part of IDEA-351174 String .chars().count() to be suggested as .length()
GitOrigin-RevId: e5f25e8dbfbfd36a855caf37869f31209356dce8
2024-04-11 14:46:25 +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
Tagir Valeev
2b2886db0c
[java-inspections] A little bit deeper analysis in Arrays.asList in Java9CollectionFactoryInspection
...
IDEA-347171 False positive from List.of intention
GitOrigin-RevId: 0eb4b04ad3134c2a74f07d84e96286d8eeb50cce
2024-04-09 09:41:32 +00:00
Tagir Valeev
f943967aec
[java-inspections] Minor fixes for IDEA-346242 Add 'minimal java version' clause automatically to inspection descriptions
...
1. Add features to assertion inspections
2. Remove redundant feature message from HTML descriptions
3. Display Java 1.3 and Java 1.4 version properly
4. Display several features when necessary
GitOrigin-RevId: 133b46152ad8376a37aa4fd847bedf38d45f3135
2024-04-05 10:20:31 +00:00
Tagir Valeev
5428775b85
[indexing] Remove progress indicator from PsiSearchHelper.isCheapEnoughToSearch and at use sites
...
Was unused
GitOrigin-RevId: 98f5e2b1f48f54fc15d54cbbf73ff549f96fca6a
2024-03-20 14:28:13 +00:00
Tagir Valeev
aed276dfd3
[java-inspections] Use LocalRefUseInfo in more contexts to avoid extra PSI traversals
...
GitOrigin-RevId: 0dae53843eebe7232460cad1c809223342824cd2
2024-03-20 14:22:13 +00:00
Tagir Valeev
37e7478c3c
[java-inspections] IDEA-344097 'collect(maxBy())' can be replaced with 'max()' replacement produces code that can not be compiled
...
GitOrigin-RevId: ba45e04a5946a73949d9d3afb15d764df2376d98
2024-03-14 19:34:55 +00:00
Tagir Valeev
3ed2f12a89
[java] JavaFeature.OBJECTS_CLASS
...
GitOrigin-RevId: 99e54a5f42368279b20fca9388f420cd6e24dee2
2024-03-14 19:34:45 +00:00
Tagir Valeev
d18c733fe1
[java] Use more Java features
...
GitOrigin-RevId: d0690e949f311dc53bdfe5ff63140e2ef15e4d55
2024-03-14 19:34:40 +00:00
Bas Leijdekkers
59d72ca4ae
[java] handle char literals better (IDEA-348632)
...
for "String template can be used" inspection
GitOrigin-RevId: 587573e95c08504af0e77a497e9abbbc743d1089
2024-03-10 15:30:33 +00:00
Aleksey Dobrynin
c9d2c80dab
[java, inspection, fix] do not fill in a module descriptor twice
...
GitOrigin-RevId: d5a2d6e23154c8fdef3dc03b8de698e955d40945
2024-03-08 18:49:41 +00:00
Tagir Valeev
214a868993
[java-analysis] SimplifyOptionalCallChainsInspection: cosmetic
...
GitOrigin-RevId: b4e6376ca1aba2b7798abc1ae7debe52bb8d280f
2024-03-08 15:17:04 +00:00
Yann Cébron
297191c9cb
[java] WrapperTypeMayBePrimitiveInspection: remove static init
...
GitOrigin-RevId: d44bb347404dbb7e7e7d63974fa6a57d62ce86bd
2024-03-06 19:11:22 +00:00
Aleksey Dobrynin
0141f07298
[java] fix naming IJ-CR-122859
...
GitOrigin-RevId: 4ac18d742ba487d8fc2e48a90188833eca1b178a
2024-03-01 22:56:28 +00:00
Tagir Valeev
d89c17fc59
[kotlin-dfa] Move inspection.data.flow.warn.when.reading.a.value.guaranteed.to.be.constant to JavaAnalysisBundle
...
Preparatory step for KTIJ-28908 Convert "Constant conditions" inspection to K2
GitOrigin-RevId: 68798782d260f8245947423efd936ae82bde841c
2024-02-24 12:22:09 +00:00
Aleksey Dobrynin
b2010f620b
[java, inspection] Change inspection name (Auto-add -> Fill in). Refactoring. (IJ-CR-126295)
...
GitOrigin-RevId: b3ac08c0c18442a1343c636e9ce404979f1210cf
2024-02-19 21:06:53 +00:00
Aleksey Dobrynin
1714ca86b3
[java, inspection] generate necessary requires for empty module-info.java file. IDEA-341665
...
GitOrigin-RevId: 47bce7db3bc4429cdfd78bbb3518e8fea1cc80b8
2024-02-16 11:31:15 +00:00
Tagir Valeev
64327f79d6
[java-inspections] IDEA-346242 Add 'minimal java version' clause automatically to inspection descriptions, based on the required feature(s)
...
GitOrigin-RevId: 50a25148d4d36c46e9552b3123d1ef966b40a2c2
2024-02-15 15:28:00 +00:00
Tagir Valeev
1b105a0cf2
[java-inspection] IDEA-344750 Warning the usage of Stream.count() may have side-effects as per Javadoc apiNote for Java 8+
...
GitOrigin-RevId: cee842e9966051f95d86f83c8e8509a08fb48c64
2024-02-15 13:23:36 +00:00
Tagir Valeev
bf85acba82
[java] More JavaFeature uses
...
Also: new JavaFeatures (ASSERTIONS, ENUMS, PRIVATE_INTERFACE_METHODS)
GitOrigin-RevId: f073845a77730b486afa56317e2c12ff044f5425
2024-02-12 19:12:43 +00:00
Tagir Valeev
e90c911b82
[java-inspections] SequencedCollectionMethodCanBeUsedInspection: fix accidental reversed boolean
...
GitOrigin-RevId: 6f080f4d6a9a7c3e0ac1dd573ac3cd41ba236c55
2024-02-08 10:08:29 +00:00
Tagir Valeev
2b41a7f753
[java] A little bit more of JavaFeature uses
...
GitOrigin-RevId: ffb3c336a16500a53000a8fbd6aa793fffd6befc
2024-02-08 10:08:19 +00:00
Tagir Valeev
72890668ad
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
Rename STREAMS to STREAM_OPTIONAL; use features instead of isLanguageLevel8OrHigher
GitOrigin-RevId: 36f56560f6c7ca626a268d8b07da86497f2501a0
2024-02-08 10:08:04 +00:00
Tagir Valeev
6a6eb357d8
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
Remove methods PsiUtil.isLanguageLevelXOrHigher for X > 9
There are only a few use sites not covered by existing features (usually checking whether some API exists). It's better to avoid shortcut to motivate people using features.
GitOrigin-RevId: 0149bf5badec79e77b7fe2066ad4ac7277d21ecb
2024-02-08 10:07:59 +00:00
Tagir Valeev
340c4d40ba
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
JavaFeature.isAvailable moved to PsiUtil, as we cannot get PsiElement language level inside frontback-api module
GitOrigin-RevId: 8092b1f55f0d90af5bc570f2fb49cdf9ef94485a
2024-02-08 10:07:48 +00:00
Tagir Valeev
d0d82eba52
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
Declare new features: SERIAL_ANNOTATION, NESTMATES, ALWAYS_STRICTFP, COLLECTION_FACTORIES, INNER_NOT_CAPTURE_THIS, STRING_SWITCH
Use more features instead of explicit Java levels
GitOrigin-RevId: e90a96501c218ed44faebb7c882770b50477b6e1
2024-02-08 10:07:38 +00:00
Tagir Valeev
87c2a93f10
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
Remove JavaFeature.isFeatureSupported() in favor of isAvailable()
Rename getLevel() into getMinimumLevel()
Avoid use of getMinimumLevel() where possible
Javadocs
GitOrigin-RevId: 4354821d8cfcf88cc1c3830b0e3cb3f221a5c122
2024-02-08 10:07:33 +00:00
Tagir Valeev
7625b3c7a2
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
Merge JavaLanguageFeature into JavaFeature
GitOrigin-RevId: 212b31d072450df03fc9eeeeb2cf0861b2b32bc1
2024-02-08 10:07:28 +00:00
Tagir Valeev
d8aa739e97
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
Use JavaLanguageFeature instead of HighlightingFeature
GitOrigin-RevId: ad24840c3e810521c82da3873ec42aa3fadb4c0d
2024-02-08 10:07:18 +00:00
Tagir Valeev
a7674dca70
[java] IDEA-345355 Refactor HighlightingFeature (in progress)
...
Create JavaLanguageFeature; move HighlightingFeature functionality there; move preview highlighting related utilities to new PreviewFeatureUtil class
GitOrigin-RevId: 116bcc9feb6fb40a0bd6a25ba10c2f35b41ffea6
2024-02-08 10:07:12 +00:00
Tagir Valeev
d469c59435
[java-inspections] IDEA-345255 Duplicate condition: improve detection of &&-chains
...
GitOrigin-RevId: e6b504e7665921e66c17690f6a144fb36dcd8124
2024-02-07 19:28:52 +00:00
Tagir Valeev
832a845510
[java-intentions] Edit Contract, Edit Range: remove on references, keep on declarations only
...
Also fixes EA-945090 - T: PsiSearchHelperImpl.processFilesConcurrentlyDespiteWriteActions
GitOrigin-RevId: 94cca91f42d6595a33edc1e8b2ba89ac38ee65bc
2024-02-06 21:35:09 +00:00
Aleksey Dobrynin
0d8b737e97
[java, kotlin, quickfix] Add dependency in a single step while using Jigsaw modules. IDEA-341660
...
GitOrigin-RevId: 7c0ad3a4079ca76c1f1afb4147498e0ae08cc449
2024-01-30 14:29:06 +00:00
Tagir Valeev
0385834f13
[jvm-inspections] Fix EmptyMethod compatibility with Kotlin
...
1. Fix suppression handling for Kotlin in global inspections
2. Fix RefMethodImpl#hasBody for top-level Kotlin functions
3. Move to JVM module
4. Add Kotlin tests
Fixes IDEA-330737 @file:Suppress("EmptyMethod") does not work
GitOrigin-RevId: 83f383e06754f510b6a99e35751263017734bb26
2024-01-29 19:42:30 +00:00
Bas Leijdekkers
ac330832ba
Java: warn on string template single line trailing whitespace (IDEA-331315)
...
GitOrigin-RevId: c3c1d5ef02d3086a2c8dbf29a9fea5b1d31d18d4
2024-01-29 16:23:18 +00:00
Bas Leijdekkers
41b6cfab0b
Java: fix SIOOBE in "Escape trailing whitespace characters"
...
GitOrigin-RevId: 1f975c570b0192a94b651e219b517f742b3b0ba0
2024-01-28 15:39:38 +00:00
Bas Leijdekkers
d18e2bf145
Java: better messages for "Class can be record class" inspection
...
GitOrigin-RevId: ed850cd155a3fcda76d62b2f27a2d4da07ce69a9
2024-01-28 01:18:30 +00:00
Bas Leijdekkers
fca5c367cc
Java: fix false positive in "Trailing whitespace in text block" inspection (IDEA-331315, IDEA-330589)
...
GitOrigin-RevId: 790d24c10069542bfed988ccf2eebc872ac666ff
2024-01-27 11:45:02 +00:00
Tagir Valeev
b8aa61dd06
[java-inspections] UnreachableCodeInspection: respect configured highlighting (part of IDEA-342966)
...
GitOrigin-RevId: 3b5a650862602cf33a6fbeaf6b31076f4cc63f67
2024-01-25 19:15:34 +00:00
Bas Leijdekkers
08239ba277
Java: disable "Wrong package statement" inspection on implicit classes (IDEA-343977)
...
GitOrigin-RevId: 5f132a51edfd0e92902623f87cbbf0292729602f
2024-01-24 20:02:48 +00:00
Bas Leijdekkers
206dfd6e21
Java: don't allow text block backward migration on string templates (IDEA-343727)
...
GitOrigin-RevId: d00838e0760694d8f1fa2c556d74512cff97a8bf
2024-01-24 20:02:41 +00:00
Mikhail Pyltsin
fca834054a
[java-inspections] IDEA-343758 Explicit class declaration can be converted to implicitly declared" for test classes
...
- added implicit usages
GitOrigin-RevId: 9c1d5830ca95a54086568c6da9147c7faf5d6e7f
2024-01-24 13:35:00 +00:00
Mikhail Pyltsin
172c052cf4
[java-inspections] IDEA-343758 Explicit class declaration can be converted to implicitly declared" for test classes
...
- skip test classes
GitOrigin-RevId: 79d50c079b9b935a0afa78167926abb962c1fb44
2024-01-23 20:26:16 +00:00