Commit Graph
6164 Commits
Author SHA1 Message Date
Anna Kozlova 7fcea68298 diamonds: copy throws list to static constructors to ensure correct unhandled exceptions, etc 2017-05-05 12:35:43 +03:00
Tagir Valeev 9ef165b0ed SimplifyStreamApiCallChainsInspection: Boolean.TRUE/FALSE::equals scenarios: check that lambda/method reference never return null 2017-05-05 13:00:00 +07:00
Tagir Valeev 23117b0247 SimplifyStreamApiCallChainsInspection: new scenarios (based on spring-boot code)
map(..).anyMatch(Boolean.TRUE::equals) -> anyMatch(..)
map(..).allMatch(Boolean.FALSE::equals) -> noneMatch(..)
map(..).noneMatch(Boolean.FALSE::equals) -> allMatch(..)
2017-05-05 11:40:11 +07:00
Tagir Valeev 5d4feb20d4 SimplifyStreamApiCallChainsInspection: suggest ot replace optional.stream().forEach() (Java 9) with optional.ifPresent() 2017-05-05 10:55:09 +07:00
Anna Kozlova 1d36b86e0c lambda: ensure static factory is used when diamonds 2017-05-04 20:29:52 +03:00
Anna Kozlova 5516110b50 lambda: don't hide raw substitutions in functional types hierarchies (IDEA-172301) 2017-05-04 20:29:52 +03:00
Anna Kozlova f3d0a39366 infer conditional expression type for incomplete calls (IDEA-171431) 2017-05-04 20:29:52 +03:00
peter 7bfb25a3e8 retain all intersection type components in dfa type (IDEA-172337) 2017-05-04 16:21:50 +02:00
peter 24e81df27c IDEA-172186 Autocomplete for interface method does not work if prefixed with 'default' keyword 2017-05-03 16:55:49 +02:00
Dmitry Batkovich 3b9d7f32a6 frequently used super class inspection: delete selected methods in quick fix; update description; set enabled by default 2017-05-03 14:19:23 +03:00
Tagir Valeev fc9fa0c222 Array index bounds checking in DFA 2017-05-03 10:28:28 +07:00
Bas Leijdekkers 5016eead0e better quick fix name 2017-05-02 20:47:50 +02:00
Dmitry Batrak 145bfafa84 IDEA-172119 Quick doc is unavailable in dumb mode 2017-05-02 20:01:27 +03:00
Dmitry Batkovich 283dfa0957 implement SuperClassHasFrequentlyUsedInheritors inspection over compiler indices 2017-05-02 18:26:19 +03:00
Anna Kozlova c0dbaa0332 process overloads to create method by method reference (IDEA-172193) 2017-05-02 12:31:24 +03:00
Tagir Valeev 9319ac47d9 OptionalUtil#generateOptionalUnwrap: support scenarios convertible to .stream() in Java 9 2017-05-02 11:30:04 +07:00
Anna.Kozlova 568bb75fbc don't highlight part of poly conditional expression when it's type is not defined, would be highlighted on top level (IDEA-171431) 2017-04-29 19:28:48 +02:00
Anna.Kozlova bdd3f7f3d6 pertinent to applicability: process return statements inside block lambda 2017-04-28 20:23:23 +02:00
Anna.Kozlova b893701408 overload resolution: same signatures should not check return types, etc already processed in hierarchical signatures (IDEA-172129) 2017-04-28 20:23:23 +02:00
Anna.Kozlova ee750f165b ensure array is not accepted as functional interface (IDEA-172048) 2017-04-28 20:23:23 +02:00
Dmitry Batkovich a82a3842bb method chains search: check assignability; use name suggester; use JavaChainLookupElement 2017-04-28 18:20:11 +03:00
Pavel Dolgov 5ef59d28e1 Java: In MethodHandle completion show the list of available signatures of overloaded method, don't complete automatically the first item from that list (IDEA-167319) 2017-04-28 15:12:25 +03:00
Tagir Valeev c3dd106963 LightCodeInsightTestCase: now test name can force the language level. 2017-04-28 15:14:27 +07:00
Anna.Kozlova 541921d315 testdata for fresh variables during applicability check (javac infers Object and fails) 2017-04-28 10:03:16 +02:00
Bas Leijdekkers af0239a648 test "Fix all 'Unnecessary fully qualified name' problems in file" 2017-04-27 19:21:50 +02:00
peter ce03a78bc0 support "assertThat(thing, is(notNullValue()))" (IDEA-172050) 2017-04-27 17:58:18 +02:00
Tagir Valeev 52e7fdf66f IDEA-170885 Simplify action for Optional 2017-04-27 18:02:23 +07:00
Tagir Valeev f4e3523f94 Map contracts; more Collection contracts; minor API changes 2017-04-27 09:36:17 +07:00
Tagir Valeev aa4a2c69a5 SpecialFields; extended contracts for List.get, List.isEmpty 2017-04-27 09:36:13 +07:00
Anna.Kozlova d82105d5ec check possible inference for method references before simplification (IDEA-171976) 2017-04-26 20:36:29 +02:00
Dmitry Batkovich 0301170130 method chains completion: fix tests (class shouldn't be functional) 2017-04-26 19:21:47 +03:00
Anna.Kozlova fbf500d2d4 inference: skip standalone expressions in lambda returns (IDEA-171922) 2017-04-26 16:28:04 +02:00
Anna.Kozlova c4d213ba26 method references: don't infer Object when no constraint exist for 'raw' reference (IDEA-171922) 2017-04-26 16:28:04 +02:00
Anna.Kozlova e2ceb575a2 testdata on javac issue 2017-04-26 16:28:04 +02:00
Pavel Dolgov 5352cf432c Java: In the inspection that checks existence of methods accessed via reflection take into account type information from Class.newInstance() and Array.newInstance() (IDEA-172003) 2017-04-26 14:43:50 +03:00
Tagir Valeev d9264ad579 DFA: MethodReference handling: reportMethodReferenceProblems extracted; do not report when all contracts are trivial 2017-04-26 17:41:53 +07:00
Tagir Valeev 9127146364 DataFlowInspection: highlight method references known to return constant true/false value with quick-fix changing them to trivial lambdas (partially fixes IDEA-170885). 2017-04-26 12:43:30 +07:00
peter c91daf1daf support boxed number comparisons in constant expression evaluation (IDEA-171861) 2017-04-25 18:46:57 +02:00
Anna.Kozlova 20113417a0 completion: don't start template if Object was inferred by the parent type 2017-04-25 17:03:13 +02:00
Pavel Dolgov e8dabd42ff Java: Fixed completion of overloaded method parameters in getDeclaredMethod("methodName", ...) (IDEA-171721) 2017-04-25 14:41:26 +03:00
Tagir Valeev b0f41a8d62 Report always true/always false condition on boolean returning methods with contracts 2017-04-25 11:25:08 +07:00
Tagir Valeev 54eb5b2d2b IDEA-171854 Suggest replacing boxed compareTo with convenience methods from Java 7 2017-04-24 17:41:21 +07:00
Pavel Dolgov b263e82d09 Java: Inspection that checks if a field or method accessed via reflection does exist and is visible (IDEA-168837) 2017-04-24 13:00:35 +03:00
Tagir Valeev 9f54ca8b27 SimplifyStreamApiCallChainsInspection: replace map with peek: support multiline lambdas (IDEA-CR-20417) 2017-04-24 15:25:38 +07:00
Anna.Kozlova 58fcabfd2b functional interfaces: allow intersection with 2 independent abstract methods with same signature (IDEA-171622) 2017-04-21 20:03:27 +02:00
Anna.Kozlova d680d55c99 register local refs to java if references are registered in literal expression by foreign contributor (e.g. reflection, data providers, etc) (IDEA-171495) 2017-04-21 20:03:27 +02:00
Anna.Kozlova 85cdf34c8a disable import static constant at annotation position 2017-04-21 20:03:27 +02:00
Roman Shevchenko e780dc29d6 Merge remote-tracking branch 'origin/master' 2017-04-21 14:05:46 +02:00
Roman Shevchenko a7c9a25e2a [java] fixes formatting in "provides with" reference list 2017-04-21 13:39:40 +02:00
Tagir Valeev 036f556c55 ControlFlowUtils#statementBreaksLoop: fix void return case 2017-04-21 17:52:15 +07:00