Commit Graph

552 Commits

Author SHA1 Message Date
Alexey Kudravtsev
3f2a2eaf34 JavaElementVisitor: notnull
GitOrigin-RevId: e4b356ce28796e2631b0a631b5108e0348b77baf
2022-06-11 23:31:48 +00:00
Alexey Kudravtsev
3119d7238f java UAST performance: avoid allocating arrays, avoid lambdas in critical path
GitOrigin-RevId: cbd0e66a1f13029fdac2ff7e2fa4e154918209f8
2022-06-11 00:38:10 +00:00
Bart van Helvert
13b35e5ecf [java] Remove unused imports
GitOrigin-RevId: 2bed87a0ce45a60dca6b652a5b3bf15401647ca5
2022-06-09 11:07:56 +00:00
Anna Kozlova
c403588017 [java] provide upcoming language levels stubs
GitOrigin-RevId: 248663a45a425f5afa63abef913f2566a6f2c78c
2022-05-30 20:31:01 +00:00
Yuriy Artamonov
b618a1ea14 [java] IDEA-294990 Simplify PsiMemberReference naming
GitOrigin-RevId: 209fea2acab2116a68dcae77c916d6d45c4f4f05
2022-05-30 13:40:25 +00:00
Yuriy Artamonov
9af72882c7 [java] IDEA-294990 Clarify PsiMemberUsageReference JavaDoc
GitOrigin-RevId: a3deca473ce1400b393d6001e7a26b1be7563432
2022-05-30 12:56:05 +00:00
Yuriy Artamonov
f94aead572 [java] IDEA-294990 Java HighlightVisitorImpl tries to resolve all references inside String literals
GitOrigin-RevId: f8b5872f56cfbfd768b417ece32061eee2e80fb2
2022-05-30 12:16:25 +00:00
Bas Leijdekkers
7537121a6e global inspections: waitForInitialized() -> initializeIfNeeded()
GitOrigin-RevId: ff6f801191e0028b285b87099a6fe73bc2343238
2022-05-29 13:35:30 +00:00
Tagir Valeev
8fd79a665c [java-inspections] IDEA-294900 Remove repeating call fix on unresolved call error
GitOrigin-RevId: 220979068250f873c725310dc8cf38a36d1e7fdf
2022-05-27 13:26:35 +00:00
Bas Leijdekkers
310e3b8f2e Global inspections: track if class is enum to simplify code a bit
(will also be used in the future for better "Unused declaration" inspection messages)

GitOrigin-RevId: a24d1d2e01fc7e0644ad06c506bac9d89e39fab3
2022-05-23 15:45:45 +00:00
Bas Leijdekkers
cb390d5287 Global inspections: safe a bit of memory in RefFunctionalExpressionImpl
no need for extra fields

GitOrigin-RevId: 380cff138838ef5d1305789c102f5bfd10e14c15
2022-05-23 15:45:42 +00:00
Bas Leijdekkers
a3dd583ed6 Global inspections: no need to have separate parameters field in RefMethod
GitOrigin-RevId: ec362918bcc4aa0fc24544423d6de650a3a15e22
2022-05-23 15:45:39 +00:00
Daniil Ovchinnikov
0718b02e42 remove BatchSuppressManager$SERVICE
GitOrigin-RevId: ba48a8f714beddf5034d37c3be314bbf806cd972
2022-05-20 08:27:28 +00:00
Bas Leijdekkers
896f2b5c87 Ignore unused parameters whose name starts with "ignore" (IDEA-293077)
GitOrigin-RevId: 225eae34a2b00318a70a86d2da9de9b8358f9d23
2022-05-04 21:22:56 +00:00
Anna Kozlova
db129f1e02 cleanup unused property
GitOrigin-RevId: aecfd310ea04ff1e468db1b0904d7d00adb44cce
2022-05-02 09:04:50 +00:00
Bas Leijdekkers
4da99e4b08 Fix batch false positives for records (IDEA-292438)
for "Declaration access can be weaker" global inspection

GitOrigin-RevId: 491c406f71bcdf2125590222f69d4ed1a046a852
2022-04-30 10:20:54 +00:00
Anna Kozlova
fb407c9394 [java] reassign variable as inspection (IDEA-207835)
GitOrigin-RevId: 99f09be79c515a15770cf38062eeca0776aa4a26
2022-04-22 18:58:37 +00:00
Bas Leijdekkers
a9981ea940 Quote modifier in inspection message
GitOrigin-RevId: b571162953afbd9afd01c65d62721dfc369730b5
2022-04-13 23:50:32 +00:00
Bas Leijdekkers
fd5a0f9032 Save some memory in the global inspection reference graph by using bitflags instead of user data
GitOrigin-RevId: 6a72d0a58a28f12ed1cd3ba4b7e08c5118810e90
2022-04-10 00:08:18 +00:00
Bart van Helvert
e51e3ad1ef [jvm] IJ-CR-22608 Add removed APIs back
When regenerating API lists some APIs got removed because they aren't tagged in the newer Java versions. This change brings them back and adds a script to find differences in API list sets.

GitOrigin-RevId: 421cc6c8f7d58e7167843f3e5b075d3d4ef6f496
2022-03-31 12:54:13 +00:00
Bas Leijdekkers
e72529cff2 capitalize "Java" (IJPF-CR-5078)
GitOrigin-RevId: 124bec7c8071720cc53d7279bfe27f00324f066d
2022-03-31 12:25:27 +00:00
Bas Leijdekkers
b4f1c851a7 global inspections: cleanup
GitOrigin-RevId: 175d36da28a8629372ae249688b8f1c97620a473
2022-03-31 12:25:22 +00:00
Anna Kozlova
c7407e3248 [java] [jigsaw] better warning descriptions (IDEA-256236)
GitOrigin-RevId: 4fd2a2ede29c261b137cb13aa2ab6ae4a4bd556c
2022-03-30 19:31:12 +00:00
Bart van Helvert
73ec60c09d [jvm] IDEA-289891 JDK 17 removed API
GitOrigin-RevId: ca19802afa150f67a659b103b0e66539b1673853
2022-03-28 15:07:14 +00:00
Bart van Helvert
c2a7aabff8 [jvm] IDEA-289891 Add removed API
GitOrigin-RevId: 73e9ad1ff814448141e977d63bc5f10aa0cd0690
2022-03-28 14:49:22 +00:00
Bart van Helvert
920d43dadc [jvm] IDEA-289891 Check inherited @since in Java API usage inspection
Also moves the generator code to a separate test and use custom JDK as mock JDK.

GitOrigin-RevId: e719b51d9e6cb35b0ab83a22c75bbc084551b6f1
2022-03-28 11:35:01 +00:00
Bas Leijdekkers
601902f5eb fix inspection message strangeness
GitOrigin-RevId: 12db0098047932e92ac468072095492cb558adea
2022-03-20 19:35:18 +00:00
Bas Leijdekkers
1eeef6da62 improve "Method always returns the same value" inspection messages
GitOrigin-RevId: 20ef273a00b17991f4ff94bbbbf94be334af4e60
2022-03-20 19:35:15 +00:00
Bas Leijdekkers
91437afcba fix typo in inspection problem descriptor
GitOrigin-RevId: e384ea2dca273f83f6c533c9cab2e3a6f0834a10
2022-03-20 19:35:13 +00:00
Bas Leijdekkers
d7b5dc3dd6 fix "Redundant 'throws' clause" inspection message strangeness
GitOrigin-RevId: cfadac43b09231acf94393bf436bd0785f3d0c59
2022-03-20 19:35:10 +00:00
Anna Kozlova
d5b2394a5d [java] remove java 16 preview (IDEA-290397)
GitOrigin-RevId: 7e8d13b39e28c57fbbe22bce8a679f7ef52724d1
2022-03-14 22:02:24 +00:00
Bas Leijdekkers
9e836fbc0f improve "Redundant 'throws' clause" inspection messages
GitOrigin-RevId: b6f78d834640381aba871356f47fcc78041db86b
2022-03-13 12:09:43 +00:00
Nikolay Chashnikov
21f928cac9 [java] fix wording for "Redundant @ScheduledForRemoval annotation" inspection (IJPF-CR-4616)
GitOrigin-RevId: cbe78de4e53a4535f7cbd513e5b0700921b9be18
2022-02-21 15:26:06 +00:00
Andrey.Cherkasov
f0000950e6 [java-intentions] Qualify a method call with an outer class name: fixes after review
IJ-CR-21030
IDEA-255881

GitOrigin-RevId: 8e6b0c6acb9505e75356c4c23c80c5c66870cd41
2022-02-19 05:57:41 +00:00
Anna Kozlova
3abb53a34a update messages
GitOrigin-RevId: 17aeca275bf310cdabdcc22529c4aacbef0ca82c
2022-02-18 10:43:37 +00:00
Anna Kozlova
9a6025f68d [java] suggest to upgrade jdk if language feature from newer version is used (IDEA-256074)
GitOrigin-RevId: 82cd81b54f9ba59def65a5639e683f2a29e6432c
2022-02-18 10:43:35 +00:00
Tagir Valeev
c04908bd1c SafeVararg annotations, misc warning fixes
GitOrigin-RevId: 37ec1a1170e5a793023a4076d9aa2eaeebfd4989
2022-02-18 10:15:54 +00:00
Andrey.Cherkasov
5a384ba859 [java-highlighting] Provide quick-fix to qualify a method call with an outer class name
IDEA-255881

GitOrigin-RevId: 137ebb954ba91bbe726a7e478b7e75060cd3b7c7
2022-02-18 04:21:27 +00:00
Nikolay Chashnikov
3de1d05eec [API] mark for removal API which was deprecated in 2021.2 or earlier and has few usages only (IDEA-281036)
GitOrigin-RevId: 6f1cdecf02dae3ab19351a4fa4e895f98265ea0a
2022-02-17 22:44:08 +00:00
Andrey.Cherkasov
22b6aff050 [java-highlighting] Provide quick-fix to remove 'var' for lambda parameters in language level smaller than Java 11
and don't suggest quick-fix to replace 'var' with explicit type for this case (IDEA-256074)

GitOrigin-RevId: e34af190c9bd86f200b26c153d27ce33750fd4df
2022-02-17 03:59:59 +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
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
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
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
c2899bebcb [java] enumerate implicitly final vars covered by 'local can be final' option (IDEA-288152)
GitOrigin-RevId: 2698ad787f7bdedb80f6fcdbb7498218f4a27430
2022-02-09 14:02:18 +00:00
Andrey.Cherkasov
b49876697c [java-highlighting] QuickFixFactory#createReceiverParameterTypeFix: rename parameters and add Javadoc
GitOrigin-RevId: ac094acae400806999cbe6b434d8abe6d2a3e388
2022-02-08 04:33:50 +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
Nikita Eshkeev
401963fa86 [java][api usage] IDEA-286618 Update API list for java 18
Add api18.txt that contains all the new API that was introduced for Java 18

GitOrigin-RevId: 836880a9442056cab76208c9afe60e3f1331ab4a
2022-02-02 22:58:59 +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
Bart van Helvert
b5858b2899 [java] Fix error message when resource can't be found when loading forbidden language API
GitOrigin-RevId: 4d54927d414f148982aef116983124b77c811414
2022-01-14 11:14:20 +00:00