Bas Leijdekkers
0274790972
Java: replace with string concatenation should be available when STR processor is not resolved (IDEA-356408)
...
for "String template can be concatenated string" inspection
GitOrigin-RevId: a996bb1220b5af4b120ba1fd7f6c2ce0859ca41b
2024-07-17 13:55:15 +00:00
Max Medvedev
328531b00d
fix PsiModificationTrackerTest#testClassShouldNotDisappearWithoutEvents
...
It is incorrect to assume that cached psi file is missing after GC because it can have been already created by some unrelated background activity.
To ensure that the cached file is different after gc-ing the previous value, we can check identity hashcode.
fixes IJPL-158486
GitOrigin-RevId: bcf0bc2a1edf18418bd5863a540c48943a110274
2024-07-17 13:32:13 +00:00
Aleksey Dobrynin
c96bc2d64f
[java, import-module] resolve "import module" jep 476 IDEA-355535
...
GitOrigin-RevId: 4a4ee8cfafdba657d062317d3e014061af69a3e4
2024-07-17 12:27:11 +00:00
SirYwell
f49ee04957
[java-inspections] Fix false warnings on signature polymorphic method lookup
...
PR#2804
Reviewed-by: Tagir Valeev <tagir.valeev@jetbrains.com >
GitOrigin-RevId: 28a1abe7b3d83e40737df88c5ce1d39933858755
2024-07-17 09:49:37 +00:00
Tagir Valeev
79a4788e62
[java-dfa] Fix additionMayOverflow for long values
...
It appears that one cannot represent additionMayOverflow as a negation of subtractionMayOverflow, due to the special handling of Long.MIN_VALUE
Fixes IDEA-356345 "Constant values" false-positive, when adding Long.MIN_VALUE to a negative number
GitOrigin-RevId: 5144b29023860aab3be05edbeffe7527b4793337
2024-07-17 08:36:52 +00:00
Tagir Valeev
2c766e6df0
[java-inspections] TrivialFunctionalExpressionUsage: do not report for any parent statement
...
Also: report any lambda inside parent return statement
Fixes IDEA-356003 Method call should not be simplified
GitOrigin-RevId: cb39dd33d27ba402a503707daffcc831ab59b49e
2024-07-16 16:41:55 +00:00
Alexey Kudravtsev
bc618f7793
fix test: avoid calling analyze() for each PIS element, production doesn't do that
...
GitOrigin-RevId: 88e9e2968688ec42a3f6dd1fb1d06390b30b83f9
2024-07-16 11:17:29 +00:00
Alexey Kudravtsev
a1fa3b8c52
test for IJPL-28717 Todo line lose coloring
...
GitOrigin-RevId: 3bfd42b1ec593b955cfb4244edebe17b60185601
2024-07-16 11:17:29 +00:00
Mikhail Pyltsin
5b7b06bbec
[java-resolving] change the order of files for test
...
- should fix flakiness of ResolveClassInModulesWithDependenciesTest.testModuleSourceAsLibrarySource
GitOrigin-RevId: bb90097287daa71b3639e201d0dbb679588d9d64
2024-07-15 21:40:51 +00:00
Mikhail Pyltsin
6a7daf2867
[java-inspection] additional wait until indexes are ready
...
- should fix flakiness of StaticCallOnSubclassTest.testMethodReference
GitOrigin-RevId: 4caa0715de7425a781ed1337e8462618a643848e
2024-07-15 17:47:50 +00:00
Mikhail Pyltsin
6c9a7642db
[java-completion] wrap MethodParameterInfoHandler.updateParameterInfo with alternative resolver
...
- should fix flakiness of com.intellij.java.codeInsight.completion.CompletionHintsTest
GitOrigin-RevId: 995618d4c55f4d283db978f4f76350d40a4eba35
2024-07-15 17:47:50 +00:00
Roman Ivanov
5d85f9552c
[java] wait till indexes are ready in ResolveClassInModulesWithDependenciesTest
...
GitOrigin-RevId: dbaf9251d8602c2a04487dbf992527f22450f957
2024-07-15 15:11:34 +00:00
Bart van Helvert
40585d1a25
[mod-command] Change modal progress bar to NBRA when computing chooser presentation
...
#IJPL-158175
GitOrigin-RevId: 0681313cfeeb3df0c6dbb2bf5194e392c96fa714
2024-07-15 02:34:03 +00:00
Eugene Zhuravlev
0143e8951f
adjust test data to test that only direct subclasses are affected
...
GitOrigin-RevId: 91017ce9dd9038879a7ce0e44a6c1dc9c2dfd000
2024-07-11 20:07:18 +00:00
Tagir Valeev
c53b8ee683
[java-dfa] TimeUnit.convert contract: returns first arg if qualifier is equal to the second arg
...
Also, report if the result is equal to the first arg (part of IDEA-172428)
GitOrigin-RevId: 1a9743305e75f1fdb772c7287e8cee0068bd31e1
2024-07-11 19:20:37 +00:00
Georgii Ustinov
b1466c2651
[Java. Code Formatting] Add migration test to JavaCodeStyleSettingsTest
...
IDEA-110857
GitOrigin-RevId: 99e5f481fd6a1351728d8194f56421bb23c07be1
2024-07-11 12:29:38 +00:00
Georgii Ustinov
029e881a2f
[Java. Code Formatting] Fix tests in JavaFormatterAroundBlankLines after new behaviour
...
IDEA-110857
GitOrigin-RevId: 61e86ace3749d42347ace6738c6b9f2a1a341148
2024-07-11 12:29:38 +00:00
Tagir Valeev
5778a45943
[java-inspections] FunctionalExpressionCanBeFolded: disable if qualifier subtype overrides default methods of function
...
Fixes IDEA-310524 "Method reference can be replaced with qualifier changes" suggestion changes behavior in unwanted ways. (Spring Security)
GitOrigin-RevId: f927ab534894188fa418a499c98af3a7c169b0cd
2024-07-11 11:02:28 +00:00
Bas Leijdekkers
90930f2998
Java: handle reassigned parameters better (IDEA-256096)
...
for "Convert to instance method" refactoring
GitOrigin-RevId: 957b0b0cecf93f6ff849d4105ed864bc6ba99c8f
2024-07-10 19:17:56 +00:00
Bas Leijdekkers
610358505b
Java: stable method ordering for "Convert to instance method" (IDEA-356128)
...
GitOrigin-RevId: 81b2e38494d7792dfe3ec13703851e4eb1539e71
2024-07-10 19:17:56 +00:00
Mikhail Pyltsin
61eda5ef9f
[java-inspections] IDEA-356142 Support several unconditional cases in "Replace if with switch"
...
GitOrigin-RevId: 55d493b34da246aa205be0fab09bf538d25b49fa
2024-07-10 18:15:49 +00:00
Bas Leijdekkers
d3f94f2739
Java: test qualifiers shown in ui (IJ-CR-138368)
...
for "Convert to instance method" refactoring
GitOrigin-RevId: a4bb1ef732d71359e52ed778f9ad36c776533e47
2024-07-10 15:32:54 +00:00
Bas Leijdekkers
04ee5be1f6
Java: change test to use UiInterceptor (IJ-CR-138368)
...
to enable testing of ConvertToInstanceMethodHandler and UI
GitOrigin-RevId: 0e12079c867c9c6a5f4abee985b42b9ef74b9914
2024-07-10 15:32:54 +00:00
Bas Leijdekkers
941612674c
Java: need to check if resolve is valid, otherwise there is no conflict (IJ-CR-138369)
...
GitOrigin-RevId: 2f895cdc66ded3ec8fb4c59843c1969e95f1c2d1
2024-07-10 15:32:54 +00:00
Tagir Valeev
02b38656a1
[java-inspections] ExpressionComparedToItself: do not duplicate reports of constant values (IDEA-345669)
...
GitOrigin-RevId: 4a7158afc602b12e7dbcf4d8d55a75c9a66f642a
2024-07-09 16:13:26 +00:00
Tagir Valeev
ca672acb50
[java-refactoring] Replace constructor with builder: do not touch anonymous classes
...
Fixes IDEA-354668 "Replace constructor with builder" does not handle anonymous classes correctly
GitOrigin-RevId: f7d340c1fe3f82bbdaba04db35512faa8ace7289
2024-07-09 16:13:26 +00:00
Tagir Valeev
bc024ed383
[java-inspections] AbstractClassNeverImplementedInspection: suppress for deprecated abstract classes
...
GitOrigin-RevId: 4c6f5eeec061cebd203a27ae845c9a4cf394ac6b
2024-07-09 16:13:25 +00:00
Tagir Valeev
de8b87911f
Unnecessary semicolon; other warning fixes
...
GitOrigin-RevId: 764ae6527647fe0d665d4f6c645693125ff70995
2024-07-09 16:13:25 +00:00
Aleksey Dobrynin
c7d2022be3
[java, import-module] Improve feedback
...
IJ-CR-138322 IDEA-355529
GitOrigin-RevId: 46e71e26b9a939c15b7a411a546c5a56e1d7e587
2024-07-09 13:11:41 +00:00
Georgii Ustinov
dbc682a07e
[Java. Code Formatting] Attempt to fix non-deterministic formatting when dependent whitespaces are used
...
IDEA-181768
GitOrigin-RevId: a31e63ad2a6145aec5ddfe329c9a7cf10d116cc7
2024-07-08 15:36:50 +00:00
Tagir Valeev
c2e018c7e3
[java-dfa] Do not flush the pure method result facts
...
Otherwise, we lose locality
GitOrigin-RevId: aed2cd27ea1c412f16deaaea346791484e02f390
2024-07-05 19:36:03 +00:00
Tagir Valeev
e1b597714c
[intention-actions] IJPL-157866 Fix all error messages doesn't always work in injected files
...
GitOrigin-RevId: d05e12a6544901c7a88ba9588527fa043be5a2ec
2024-07-05 19:36:03 +00:00
Mikhail Pyltsin
d62c8eeb47
[java] IDEA-355892 JEP 477 JEP 477. Problems with run gutters
...
- more tests
GitOrigin-RevId: f2be06bb75879426215cd6da01d3b51b17215b34
2024-07-05 19:03:55 +00:00
Mikhail Pyltsin
86f9b646e3
IJ-CR-138987 [java] IDEA-355892 JEP 477 JEP 477. Problems with run gutters
...
- more assertions
- add comment
GitOrigin-RevId: 3c804fec7727a5527b522aaf0a16bb55507b4cc3
2024-07-05 18:56:13 +00:00
Eugene Zhuravlev
40bbc9947b
JPS: support java16 instanceof pattern matching
...
GitOrigin-RevId: 5a2777c4234e63621c1daf4bc11da402edaae8f5
2024-07-05 17:52:09 +00:00
Eugene Zhuravlev
7ffc3f8f8b
JPS: generalize support for java17 sealed classes; supported case when permitted list gets reduced
...
GitOrigin-RevId: 9be5ef80b3dd00509cbe9e5dce2f9f00c4b6557a
2024-07-05 17:52:09 +00:00
Mikhail Pyltsin
634c6b833b
[java] IDEA-352189 Support JEP 455. Implement increase language level check and fix
...
- add more tests
GitOrigin-RevId: 2545d756cff9650487cc2b12c0b8b5390d1863e7
2024-07-05 11:34:47 +00:00
Tagir Valeev
180afa6fe6
[intention-actions] Apply 'fix offset' correctly in injections
...
Fixes IDEA-355696 Sometimes insert semicolon action inserts in the wrong place in injections
GitOrigin-RevId: 6a8e35bdd0f28b8cb9f123fd6112f78152c3bd22
2024-07-05 11:13:08 +00:00
Tagir Valeev
6bb83bc8e5
[stubs] Reduce amount of raw types
...
GitOrigin-RevId: 169895a6ee3c98db193443dbb0ced98497221430
2024-07-04 21:05:23 +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
Mikhail Pyltsin
ee1495d613
[java-inspections] IDEA-355916 Support JEP 477 Update ImplicitToExplicit inspection
...
- first part. update for implicit static imports
GitOrigin-RevId: 8c0fdf1c8ebd424a80e53b93c707fba02a07448a
2024-07-04 20:24:54 +00:00
Mikhail Pyltsin
c437caf780
[java] IDEA-355892 JEP 477 JEP 477. Problems with run gutters
...
- new java features are introduced (for main methods)
- `mainCandidateComparator` is moved to `PsiMethodUtil`
- `PsiMethodUtil.findMainMethod` can compare methods and not only return first
- ApplicationRunLineMarkerProvider works with `getSlowInfo` in dumb mode
- ApplicationRunLineMarkerProvider uses the same logic for classes and methods
GitOrigin-RevId: e2c20e8690ac032b52c7de742cdb39933ef1d1d3
2024-07-04 20:24:54 +00:00
Georgii Ustinov
a01e2c2c9f
[Java. Code Formatting] Add tests for blank lines with rearrangement
...
IDEA-110857
GitOrigin-RevId: f21d7c0a9decf830d76c5a25085f4f77448971a8
2024-07-04 19:56:49 +00:00
Georgii Ustinov
37c6900424
[Java. Code Formatting] Add tests for blank lines around annotated/non-annotated fields
...
IDEA-110857
GitOrigin-RevId: 84dcb160fb09831989b1defee8ee83cace3beb45
2024-07-04 19:56:49 +00:00
Georgii Ustinov
6134c3049a
[Java. Code Formatting] Update jsonExport
...
IDEA-110857
GitOrigin-RevId: 4cb74026d322756f34ec2aa29f674618591ea3f9
2024-07-04 19:56:49 +00:00
Mikhail Pyltsin
847a369e5d
[java-inspections] IDEA-355900 JEP 477 Convert to implicit class should not be suggested if the class is annotated
...
GitOrigin-RevId: 748b90d19a74d0023573448557286433c9300646
2024-07-04 15:45:39 +00:00
Mikhail Pyltsin
ff1ce5a0bd
[java] IDEA-352189 Support JEP 455. Implement increase language level check and fix
...
GitOrigin-RevId: d69e01d624fcfc4ddb3af7292693ed056efc88a4
2024-07-04 15:25:05 +00:00
Mikhail Pyltsin
ab46a9f54a
[java] IDEA-355569 Support JEP 455, 477. Reuse a new java language level
...
GitOrigin-RevId: 17969311436a766d25da0207ee236808084f308f
2024-07-04 15:25:05 +00:00
Tagir Valeev
174c24c450
[java-highlighting] Fix testdata (IDEA-355703)
...
We report less errors after [java-incomplete-model] Assume that any unresolved class-type is assignable to java.lang.Object
GitOrigin-RevId: a94eda62a430367a8fb1b5159fae4446a35687e1
2024-07-03 22:09:42 +00:00
Mikhail Pyltsin
f90bd8b6f1
[java-inspections] IDEA-355790 JEP 477. Suppress for class doesn't work
...
- These changes disable suppressions for implicit classes
GitOrigin-RevId: ff2fac065c092f257548bbfec5c799d48e116cac
2024-07-03 22:08:48 +00:00