Commit Graph

1878 Commits

Author SHA1 Message Date
Bas Leijdekkers 4b18db9bfb Add quick fix to remove duplicate annotation without parameters (IDEA-249508)
GitOrigin-RevId: fea7daeb0bb40724325182d6041a20aa141fbbf2
2020-11-23 21:56:24 +00:00
Daniil Ovchinnikov 932ea20745 IDEA-252714 [java] use anchor if request is coming from tree child of target class
GitOrigin-RevId: 8248fb4f61867773b41c5274b52f2e73b3867972
2020-11-12 14:55:22 +00:00
Anna Kozlova c9c3a31e74 redundant suppression: search for text with suppressId in narrow element if applicable (IDEA-221643)
GitOrigin-RevId: 1b13bcda0f78e882ddd51a0d6eccb4a662a441c4
2020-11-09 17:12:46 +00:00
Bas Leijdekkers 0954a97685 IPP: make intention texts more distinguishable from each other
GitOrigin-RevId: 47d0fe080875ef6f68bac5fa3b2e836c2f5430c0
2020-11-06 13:43:59 +00:00
Anna Kozlova f8a53347cf java: split declaration & assignment: fix for very broken code (IDEA-254385)
forcePsiPostprocessAndRestoreElement may invalidate variable initializer

GitOrigin-RevId: 31b99804e5603cff36494ecbf9f98c1716b13d22
2020-11-02 20:18:09 +00:00
Anna Kozlova 48a0c3c03c java create class from usage: disable for expected array type or expected super class while enum/record can't have any
GitOrigin-RevId: 042aed924d9fc35e1ca86ae8660a7a75fe45bd25
2020-10-27 13:27:22 +00:00
Anna Kozlova dc51016e34 java: create class from usage: fix for patterns expression (IDEA-253733)
GitOrigin-RevId: e135c45026fc852ace913a57689380c5175f766e
2020-10-26 14:53:29 +00:00
Andrey.Cherkasov 3af0d4d509 IDEA-251250 fix texts for JavaDocLocalInspection
GitOrigin-RevId: 8897fd1a878deea3a724b8632fadd2e3b9095f06
2020-10-23 14:57:53 +00:00
Anna Kozlova 61231a0223 inspections: don't check redundant suppressions from inspections with global part (IDEA-208688)
local checks may be more pessimistic and it could lead to false positives

GitOrigin-RevId: 131000dee73567951cba939949e7abc267019eaf
2020-10-23 06:54:02 +00:00
Andrey.Cherkasov ce5ed84489 IDEA-251250 fixes after code review
GitOrigin-RevId: 383931c2a4caf3b4856ebbe9869f83c180f81879
2020-10-22 22:50:10 +00:00
Tagir Valeev 5495f1f9ea [java-analysis] Do not mark parameter as UNMODIFIABLE_VIEW if the method mutability is inferred
Fixes false-positive in RedundantUnmodifiableInspection

GitOrigin-RevId: 82cd0651ea87f62066a8a299ba3d5b572d617ab0
2020-10-22 07:46:18 +00:00
Andrey.Cherkasov f746cdbdc4 IDEA-251250 add quickfix for JavaDocs annotations for inspection "tag description is missing"
GitOrigin-RevId: 144bc690511b94af09184780d3621ff1e31b9068
2020-10-21 11:33:22 +00:00
Anna Kozlova 64cb6979ca redundant suppression: don't warn on "all" locally as global tools are not run (IDEA-253244)
GitOrigin-RevId: 3666dcf887e8a4735dee08f16e172c9272bfca24
2020-10-20 19:56:45 +00:00
Andrey.Cherkasov d8f40a6bf9 SuspiciousTernaryOperatorInVarargsCallInspection: fix test
GitOrigin-RevId: 8a62405481be34ff98f239ca345fc03d91dec520
2020-10-15 19:22:00 +00:00
Artemiy Sartakov ec0518a125 Sealed classes: create class from permits list reference now adds appropriate parent (IDEA-251830)
GitOrigin-RevId: 67f0506d9521f9b14eb5cfb99164eb1ba37f03b4
2020-10-15 11:43:45 +00:00
Tagir Valeev fdb5a1025d [java-inspections] CodeBlockSurrounder: disable in enum initializers
We could devise something like ((Runnable)() -> {...}).run() but this kind of code looks too ugly.
Fixes IDEA-252688 Assertion error when applying fix to assert not null in enums

GitOrigin-RevId: 6f2122acb60cfcb074cc47e6bc599626fe5547fd
2020-10-14 05:42:27 +00:00
Artemiy Sartakov b0c9f63799 Sealed classes: show create class fix instead of create type parameter in permits list (IDEA-251830)
GitOrigin-RevId: 4de0ea71c210e7da57f99b8295b7e511d9674120
2020-10-07 05:42:50 +00:00
Tagir Valeev d833da5281 [java-inspection] IDEA-252155 False positive "Lambda can be replaced with method reference" when casting with additional bounds
GitOrigin-RevId: 2b752e6b47a0d53b05b4e7cd98064c5ce54e2904
2020-10-06 08:04:23 +00:00
Tagir Valeev ebc61af5e8 [java-intention] CollapseIntoLoopAction: disable inside switch and on declarations (IDEA-251600)
GitOrigin-RevId: de00fe6b26f1969f8f9df0ac2d944ec76f402c8c
2020-10-02 04:09:06 +00:00
Andrey.Cherkasov 4d2632fc41 Fixes after review: IDEA-202309
GitOrigin-RevId: 542cdc5e1c3b401a6a3e37504cf9351212aac4be
2020-09-28 10:57:18 +00:00
Andrey.Cherkasov 6fbd744430 RedundantUnmodifiableInspection created: IDEA-202309
GitOrigin-RevId: d5a5e1f45ba0f6e0af786ca588caaa192cd4b554
2020-09-25 11:52:07 +00:00
Andrey.Cherkasov f65fd090cd Fix test IDEA-244144
GitOrigin-RevId: fe15366aaed97e7c3f0c07453a51d121ab3ab3bc
2020-09-23 09:12:25 +00:00
Andrey.Cherkasov 9845c0a0c2 Support parentheses, fix bug when the array branch has a primitive array, more tests: IDEA-244144
GitOrigin-RevId: 4c644d8b1e11869e4f3853763d09d7e0b91b5740
2020-09-22 12:24:19 +00:00
Tagir Valeev a0f0dabaa4 [java-highlighting] IDEA-246748 Remove support of C-style array declaration in record components
Actually suggest a fix if somebody uses it

GitOrigin-RevId: 57ee72ebdc99ebe506a88696bf37f9319cdbcc33
2020-09-21 09:44:54 +00:00
Andrey.Cherkasov eb5e81dcb4 SuspiciousTernaryOperatorInVarargsCallInspection created: IDEA-244144
GitOrigin-RevId: cc56e98bf46b87d1b685177a72bccfd4fc80a596
2020-09-18 23:04:15 +00:00
Andrey.Cherkasov 50af51d8d1 Support the case when then array initializer is taken into parentheses; more attention to comments in fix: IDEA-238645
GitOrigin-RevId: d4557daa9b37e9f103b6453d9e0ad3a18df0a870
2020-09-16 12:30:36 +00:00
Andrey.Cherkasov d6ecf8f1f0 Fixes after review: IDEA-249165
GitOrigin-RevId: 5f90b50bd298dbc73283a6b2e78267483211c111
2020-09-15 21:23:00 +00:00
Tagir Valeev 390a408fa0 Bundle ICU4J; create NlsMessages to format duration and and/or lists
Fixes IDEA-247854 Formats#formatDuration is not localizable

GitOrigin-RevId: adb56cac0ecc7c47a644887e3eb17e9ca26b47bd
2020-09-15 04:50:16 +00:00
Andrey.Cherkasov 6100adc63f IDEA-238645 Test fixes and some refactoring
GitOrigin-RevId: 5a3ac649c4639a0a2981608c1f503fbea72ce3be
2020-09-15 01:56:30 +00:00
Artemiy Sartakov 859a8fa5ba ExtendSealedClassFix: fix added (IDEA-249603)
GitOrigin-RevId: d47a517c15f0a011fae581db7aacf4b1a76bad1b
2020-09-10 09:55:47 +00:00
Andrey.Cherkasov 080b533383 Fixes after code review: IDEA-249165
GitOrigin-RevId: db35ebb920618b5e2105715406c1e24eb50bb71a
2020-09-08 07:31:16 +00:00
Tagir Valeev a7fbd25b9e [java-intention] MoveParenthesisFix: remove unnecessary MethodCandidateInfo check
It prevented from finding single correct version if multiple overloads are available

GitOrigin-RevId: 8759aaaee8f0b7cce044a3bf447661e5ea30dabe
2020-09-07 10:28:38 +00:00
Bas Leijdekkers e310b0c94c inspection warning text improvements
GitOrigin-RevId: 9aaad61ae52463727c77930af532258ea16dd1da
2020-09-04 10:23:25 +00:00
Andrey.Cherkasov a65ac28d32 RedundantFileCreationInspection created: IDEA-249165
GitOrigin-RevId: 2d8ea0c12c2320d5f8b0e685b9a047bf3f972852
2020-09-04 09:42:42 +00:00
Tagir Valeev 5b88621295 [java-intentions] IDEA-249810 Automatically fix closing parentheses in nested calls
GitOrigin-RevId: 9447905d0f2fda68b7f61b9310088b2f109d6b0e
2020-09-03 03:45:03 +00:00
Tagir Valeev a0f9fd146b [java-i18n] More uniform call-chain support; fixes property test with parentheses
GitOrigin-RevId: 7f91d71dd6e87771165b35a33f322533f64a49ca
2020-09-01 09:28:19 +00:00
Anna Kozlova a2e3d7e5ab java: reject diamonds in anonymous classes with non-private methods (IDEA-248972;IDEA-248973)
GitOrigin-RevId: 5300c91c601dd59f3a020ac6a6627517aaca68c7
2020-08-27 11:11:51 +00:00
Anna Kozlova 9fe8cbf7c9 fix testdata
GitOrigin-RevId: cfd971b44341a6c0c218aa986da7d5d3101f54da
2020-08-26 16:51:25 +00:00
Anna Kozlova 6b78c18ce8 i18n: detect last concatenation (IDEA-249116)
GitOrigin-RevId: 5bf832e023bc24f721ece8eafc698e3e042c94b7
2020-08-26 16:23:57 +00:00
Anna Kozlova aa937e1f93 i18n: don't create nested choices, escape special symbols in choice sides (IDEA-247804)
GitOrigin-RevId: dcb56f8bf352bc8f656edd85242be6b3c70af34d
2020-08-25 11:17:27 +00:00
Tagir Valeev 93479e1f99 [java-intentions] Remove 'Add constructor parameter' fix for record fields (IDEA-248139)
As record instance field declaration is illegal, this action is useless anyway and only adds confusion

GitOrigin-RevId: 4a1862f66c5a175fef675705e6af53ef5bae1f78
2020-08-24 12:08:39 +00:00
Anna Kozlova a232f81e1a i18n fix assignment: detect concatenations in rOperand
GitOrigin-RevId: 62ff07771c6b55807cddee1c0e514540c0b258d7
2020-08-24 11:19:48 +00:00
Tagir Valeev 8a830c1018 ReturnSeparatedFromComputationInspection: do not process if variable and return are in different scopes
Fixes EA-237085 - assert: ControlFlowUtil.isVariableReadInFinally

GitOrigin-RevId: 1f48700f3f08faf96f12b440b3fd54d735c50620
2020-08-24 10:42:56 +00:00
Anna Kozlova af1c8c2574 i18n fix: traverse to the expression top level (IDEA-248707)
if one need to extract subpart of concatenation, it's required to extract a variable; similar to parts of polyadic expression

GitOrigin-RevId: 46cd1a75303b72ea64e9694617fb43f4d3da5982
2020-08-21 08:03:52 +00:00
Anna Kozlova 05ccb72166 i18n fix: fix choice format parameters ordering (IDEA-248709)
GitOrigin-RevId: 84fa26fcbd459bcf263df0adf224afebb6bdeb31
2020-08-21 07:10:41 +00:00
Tagir Valeev fa03a31c48 Messages clarified, quotes added
GitOrigin-RevId: f191ad36a574aa3543758ce87ad0b03cc01cc550
2020-08-18 12:02:48 +00:00
Anna Kozlova 8fc89fc6f5 java: add fix to expand 'var' type when type annotation is used (IDEA-248364)
GitOrigin-RevId: 826f1e07587dc4d85214f5d0cafd5776d3448a95
2020-08-18 11:11:09 +00:00
Tagir Valeev ea5e79ca14 [java-inspections] StreamApiMigration: parentheses like (br).readLine()
GitOrigin-RevId: 9f71c7b1a41cd74abd0e51a0637a3da13ce955b6
2020-08-10 09:36:28 +00:00
Artemiy Sartakov ec30bf3a97 Sealed classes: update hierarchy fixes (IJ-CR-2554):
1. add missing same file inheritors to permits list during safe delete or create subclass refactoring
2. inline isParentSealed for inline to anonymous class refactoring
3. do not make sealed class final when removing last inheritor (just remove sealed modifier)

GitOrigin-RevId: acf3652f12144446116c5d71ea1722b06b9f6b92
2020-08-10 09:19:20 +00:00
Ilyas Selimov 39c3b20e3d [java-i18n] fixes
GitOrigin-RevId: 6c6aa131594515157bad57a25703e147cd529f88
2020-08-06 06:17:39 +00:00