Commit Graph

13 Commits

Author SHA1 Message Date
Bas Leijdekkers
9a44d02318 Java: better name suggestions for boxed types, filter out common bad names and add special cases for common methods
GitOrigin-RevId: 2bf3977d2873bd133ac6acb85df54aece740f428
2023-02-14 13:53:56 +00:00
Bas Leijdekkers
3c556d8fe0 Java: ignore "as" and "to" prefixes to generate better variable names (IJP-1469)
GitOrigin-RevId: 12cde9892bece40321b4655e7d32b75bd43748e8
2023-01-26 00:04:15 +00:00
Artemiy Sartakov
33492f3827 OptionalToIfInspection: preserve code blocks with user code when they contain more than one instruction (IDEA-267045)
GitOrigin-RevId: 2abb37a3ce54c4ca126d55b52b68fe44cbc9ccfc
2021-06-07 06:15:29 +00:00
Andrey.Cherkasov
0d10ba565e [java] Fix test data files after inspection description updating
GitOrigin-RevId: faa9f564b7a37e4c1165c24f904994b951adfccd
2021-03-18 10:49:54 +00:00
Artemiy Sartakov
349d58606e OptionalToIfInspection: propagate rename to nested flatMap
GitOrigin-RevId: ae65a4a91dbefc73bd160a2b92a36e296fed3c3e
2020-05-01 09:40:21 +00:00
Artemiy Sartakov
fcd1363aee OptionalToIfInspection: propagate rename to nested operations for flatMap and or
GitOrigin-RevId: 338d1c5e49a05fdd0ab60321275acc7ac51bcb4d
2020-04-30 05:32:53 +00:00
Artemiy Sartakov
b08c47448e OptionalToIfInspection: track flat map param name so it won't be used in another operation
GitOrigin-RevId: 42f90e621d37435cc122ee36c6b0a3267356c5e3
2020-04-29 08:35:45 +00:00
Artemiy Sartakov
f0c78aea15 OptionalToIfInspection: misc fixes
1. generate if with curly braces when it contains single declaration inside
2. restore else branch after generating code for flatMap
3. do not reassign source variable for nested source operations

GitOrigin-RevId: 061fbcc8d8dda586dcecb9a448752709a43370da
2020-04-21 08:55:39 +00:00
Artemiy Sartakov
db85d0d62b OptionalToIfInspection: cr fixes (IDEA-CR-51167)
1. add new line before and after code block braces when wrapping user code
2. add example in inspection description
3. remove OptionalToIfInspectionTest#runSingle
4. remove duplicates from operation names list
5. remove unnecessary whitespaces from strings with converted operations
6. support final variables and local variables with implicit type
7. honor operation precedence when merging two if checks during simplification
8. StringUtil#join instead of Collectors#joining
9. remove code after throw during simplification

GitOrigin-RevId: cd3273072ad3bdba21aa5b28a6fd13dc325e93ad
2020-04-21 08:19:27 +00:00
Artemiy Sartakov
7e0b374d13 OptionalToIfInspection: preserve comments
GitOrigin-RevId: 7e97d9997d6f0eaca40e1e9cd720dc27e7ca687a
2019-11-12 10:34:02 +00:00
Artemiy Sartakov
4f473648ee OptionalToIfInspection: tests for parenthesized expression and partial chains (IDEA-CR-52832)
GitOrigin-RevId: cbfa6550167e9dd9e157ab860a6ead486938f2cd
2019-09-25 08:31:20 +00:00
Artemiy Sartakov
d98814d304 OptionalToIfInspection: added missing imports (IDEA-212269)
GitOrigin-RevId: afbeaa1f10b2266cd1401da83b71cf0bf6862824
2019-08-07 17:02:43 +03:00
Artemiy Sartakov
6f1efb8fc0 OptionalToIfInspection: added inspection to desugar optional chain to sequence of if statements (IDEA-212269)
GitOrigin-RevId: c83b70e05544529b3dfffe24bc87997910edcb56
2019-08-07 17:02:43 +03:00