Commit Graph
6209 Commits
Author SHA1 Message Date
Anna Kozlova 40cbf4648a fix testdata 2017-05-18 10:50:55 +03:00
Tagir Valeev 9f7b27a7cc BytecodeAnalysisIntegrationTest: expected annotations fixed (somehow these two were missing) 2017-05-18 14:40:57 +07:00
Tagir Valeev f2442e32fa ConvertSwitchToIfTest: test5 rewritten as getClass() is now pure 2017-05-18 14:36:52 +07:00
Tagir Valeev c41245708f Bytecode analysis: purity inference improvement (also fixes IDEA-172989):
1. Lambda/method reference creation is pure
2. String concatenation is pure
3. Constructor which only modifies own fields (calls setters, etc.) is pure
4. Exception creation is pure
5. A few hardcoded native methods
2017-05-18 10:52:53 +07:00
Tagir Valeev af20bc97d0 DFA: ignore ranges for float/double (was introduced during DfaFactType merge) 2017-05-18 10:52:52 +07:00
Tagir Valeev 8323d2f78d BulkMethodInfo: support for Java 1.4 (fixes EA-101278). 2017-05-17 11:54:09 +07:00
Anna Kozlova 94dd554c0c don't use void in non-free method calls (IDEA-172958) 2017-05-16 21:33:01 +03:00
Anna Kozlova 5459a3b0e0 update testdata (IDEA-CR-21114) 2017-05-16 11:39:50 +03:00
Anna Kozlova 350f588c09 unused declaration: take refs from literals into account (IDEA-172447) 2017-05-16 09:08:10 +03:00
Anna Kozlova d634c51afe javadoc: include all throws unchecked exceptions from all super methods (IDEA-152938) 2017-05-15 18:59:37 +03:00
peter 582f0f9571 IDEA-CR-20904 fixes after review (IDEA-123301 Show a warning if 'List<@Nullable X>' is passed to a place where 'List<@NotNull X'> is expected)
supported maps, inheritance, returns, functional expressions
2017-05-15 16:16:19 +02:00
Dmitry Batkovich 18592664b7 method chain completion: remove sub lookup element (automatic argument insertion) 2017-05-15 16:27:16 +03:00
peter f6885971b9 NullableStuffInspectionTest: use jdk 8 2017-05-15 13:32:46 +02:00
Tagir Valeev 887708387d Objects.requireNonNull is not pure as it executes the passed lambda 2017-05-15 17:02:44 +07:00
Pavel Dolgov c7d8ad3401 Java: Don't reuse cached ControlFlow when the context is not equivalent (IDEA-168768) 2017-05-15 12:34:52 +03:00
Tagir Valeev 67e97bc713 ObviousNullCheckInspection: ignore null literals 2017-05-15 15:11:38 +07:00
peter 29672cb324 java smart completion: prefer all items with exactly expected type, not only classes (IDEA-169490) 2017-05-15 09:16:00 +02:00
Tagir Valeev 1305a60e44 IDEA-172798 "Immutable collection creation can be replaced" to remove temporary variable used for assignment 2017-05-15 13:21:05 +07:00
Tagir Valeev b3339b7cfd IDEA-165108 Objects.requireNonNull with argument of primitive type should be reported as warning 2017-05-15 13:08:30 +07:00
Maxim.Mossienko 094d0b26fe Stray swap file in intellij-community (IDEA-172846) 2017-05-14 08:10:10 +02:00
peter 1c977bd5dd IDEA-170406 Prefer expected enum constants in annotation attribute, despite statistics 2017-05-13 07:53:22 +02:00
peter 514f227143 don't unwrap do-while statement with break/continue inside (IDEA-CR-20896) 2017-05-12 14:21:57 +02:00
Alexey Kudravtsev 4a4626c750 removed default file header, because it adds no information but subtracts attention and space 2017-05-12 14:02:24 +03:00
Tagir Valeev ed2d5b33fe SuspiciousArrayMethodCallInspection: erased types are compared (fixes IDEA-172742). As the corresponding argument accepts Object or Object[], exact generic signature cannot be always inferred. 2017-05-12 11:11:05 +07:00
peter 88bdc032be look for conflicts when replacing 'for' with its initialization (IDEA-CR-20896) 2017-05-11 17:43:42 +02:00
Pavel Dolgov d6cd98dc83 Java: Merge all MethodHandle/VarHandle checks into a single inspection (IDEA-172358, IDEA-171813, IDEA-167318) 2017-05-11 15:16:31 +03:00
Pavel Dolgov 9e6ebdaa44 Java: Inspection to verify parameters of VarHandle.get(), VarHandle.set(), and similar methods (IDEA-172358) 2017-05-11 15:16:31 +03:00
Alexey Kudravtsev 920d5b4fba removed default file header, because it adds no information but subtracts attention and space 2017-05-11 13:39:07 +03:00
Tagir Valeev 9282a67e6b RedundantArrayForVarargsCallInspection: do not warn if nested array initializers are used (fixes IDEA-165068) 2017-05-11 13:22:56 +07:00
Tagir Valeev 72078f0b1d RedundantArrayForVarargsCallInspectionTest: make it LightInspectionTestCase 2017-05-11 13:22:55 +07:00
Anna Kozlova d31ca80cac testdata for IDEA-158047 2017-05-10 20:35:34 +03:00
Anna Kozlova 728ed62ed0 testdata for IDEA-157350 2017-05-10 20:35:34 +03:00
peter 932d1215d6 make 'remove loop' fix work for '(false)' and 'for' (IDEA-CR-20896) 2017-05-10 17:11:34 +02:00
peter a9db058d17 java completion: suggest guava/protobuf builder variants (IDEA-130386) 2017-05-10 10:13:55 +02:00
Anna Kozlova d3b899c7a9 static factory detection for top level method call (IDEA-172566) 2017-05-10 09:14:16 +03:00
Tagir Valeev e46d305cb0 DfaPsiUtil#getFunctionalParameterNullability: use known type nullability for SAM parameters 2017-05-10 11:02:51 +07:00
peter 2461a8751c IDEA-163986 Code complete second default array argument in annotation 2017-05-09 14:37:54 +02:00
Anna Kozlova ee0e90d92c provide applicability substitutor when inference fails for parent expression 2017-05-08 22:58:02 +03:00
peter 4c858997f1 IDEA-123301 Show a warning if 'List<@Nullable X>' is passed to a place where 'List<@NotNull X'> is expected 2017-05-08 18:30:28 +02:00
peter 6b43b5ba7d IDEA-171248 Nullabiltiy: missing warning in for-each cycle 2017-05-08 16:33:19 +02:00
peter 6022466f17 IDEA-172479 Remove loop fix 2017-05-08 16:33:19 +02:00
Anna Kozlova 77f4894aae inference errors: make applicability error thread safe so multiple threads can perform overload resolution of parent method calls independently, save presentable error when substitutor cached only 2017-05-08 12:12:13 +03:00
Alexey Kudravtsev 759648df75 Non-ASCII characters inspection 2017-05-05 15:23:22 +03:00
Pavel Dolgov 7d81b55b37 Java: Implemented MethodHandle part of inspection "MethodHandle/VarHandle invocation arguments mismatch" (IDEA-171813) 2017-05-05 13:14:04 +03:00
Tagir Valeev dc80c4f83a IDEA-172417 Dataflow analysis: track that loop is visited if and only if array/collection is non-empty 2017-05-05 16:37:31 +07:00
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