Commit Graph
2787 Commits
Author SHA1 Message Date
Anna.Kozlova 9f3dfc8629 check that inferred intersection type doesn't contain same generic type with different type arguments (IDEA-170325) 2017-03-28 10:09:30 +02:00
Anna.Kozlova 95226c21c5 explicit right to left side assignment failure when inference breaks on return type (IDEA-152677) 2017-03-27 10:34:43 +02:00
Tagir Valeev 93e35b7334 ExtractSetFromComparisonChainAction improvements (IDEA-CR-19606)
1. Fixed modifiers for interfaces
2. Replacement wrapped with Collections.unmodifiableSet
3. Supported Java 1.4 and lower
4. Supported Guava ImmutableSet
5. Supported comparisons like s.equals("xyz"), Objects.equals(s, "xyz")
2017-03-27 12:35:02 +07:00
Roman Shevchenko 5e5c14c57e [java] raises language level to Java 9 2017-03-24 18:35:57 +01:00
Roman Shevchenko 6bd1b92c6e [tests] prepares Java tests for the language level raise 2017-03-24 13:19:01 +01:00
Roman Shevchenko 1abffecba5 Cleanup (warnings, formatting) 2017-03-24 13:18:59 +01:00
Anna.Kozlova ca035634d1 warn if generics vararg method is called with 50+ poly args (IDEA-169240) 2017-03-23 15:49:44 +01:00
Tagir Valeev d9702d7d8d ExtractSetFromComparisonChainAction: i18n, java9 test, disable in Java 1.4 or lower (as varargs and generics aren't available there) 2017-03-22 18:30:28 +07:00
Tagir Valeev b0c584a295 IDEA-170033 Support raw-types when converting Iterable.forEach to loop 2017-03-22 16:51:46 +07:00
Tagir Valeev 836c498178 IDEA-168201 Intention to extract a set from "foo".equals(xyz) || "bar".equals(xyz) 2017-03-22 16:35:33 +07:00
Pavel Dolgov 4d60277ee6 Java: Implemented sorting the candidates pop-up and added icons in that pup-up for "MethodHandle/VarHandle type mismatch" (IDEA-167318), refactored upon review feedback (IDEA-CR-19455) 2017-03-21 14:37:01 +03:00
Anna.Kozlova 278d43dc00 enable static import quick fix on "method expected" error (IDEA-169966) 2017-03-21 12:18:45 +01:00
Anna.Kozlova e75f2f7860 make message closer to javac error (IDEA-169865) 2017-03-21 12:18:45 +01:00
Tagir Valeev f764692965 StreamToLoopInspection refactoring: strings replaced with actual PsiType's (as they are valid now); removed unnecessary code due to all PsiExpressions are also valid 2017-03-21 14:21:29 +07:00
Anna.Kozlova c482c21b29 create from usage: ensure type parameters are extracted from wildcards (IDEA-169857) 2017-03-20 11:45:14 +01:00
Tagir Valeev efdfa0a22c IDEA-169518 Convert "Move assignment to field declaration" to the inspection 2017-03-20 16:26:40 +07:00
Anna.Kozlova 2159d803f8 add javac quirks case for object-primitive comparison (IDEA-168944) 2017-03-17 16:42:50 +01:00
Pavel Dolgov d81332e1f8 Java: Improved inspection "MethodHandle/VarHandle type mismatch" - show candidates for replacement of method/constructor in a separate pop-up menu (IDEA-167318) 2017-03-17 15:15:45 +03:00
Tagir Valeev 55466aeef1 IDEA-169678 "Replace Optional.isPresent() condition with functional style expression" breaks code in case of 'Collection' return type 2017-03-16 11:22:15 +07:00
Anna.Kozlova d688a9a7a4 guess expected type like for completion if on the left side of assignment to functional expression which provides in this case no expected type (IDEA-169382) 2017-03-15 20:07:06 +01:00
Anna.Kozlova 2464532a56 fix testdata due to changes in defaults 2017-03-15 16:18:57 +01:00
Roman Shevchenko 2d8c4a0e3c [tests] better test for module annotations (IDEA-169410) 2017-03-15 14:32:41 +01:00
Anna.Kozlova 9dfdd49e17 find class or interface to search the method: stop when accessible method is found even with static problem (IDEA-169504) 2017-03-15 10:41:42 +01:00
Anna.Kozlova 1e9f6352f2 make add cast fix available for vararg methods (IDEA-169541) 2017-03-14 14:17:14 +01:00
Pavel Dolgov 30039b5085 Java: Added quick fix tests for "MethodHandle/VarHandle type mismatch" inspection (IDEA-167318) 2017-03-14 13:21:13 +03:00
Tagir Valeev b2cd46bdeb StreamApiUtil: fix addition of map operation when object-object cast is involved 2017-03-14 13:19:47 +07:00
Anna.Kozlova bb7868f450 diamonds: don't infer raw type when inference of a staticFactory failed
avoid blinking tests on overload resolution: make outer method call not applicable by inferring incomplete results like it's done for method calls
2017-03-13 14:16:44 +01:00
Dmitry Batkovich f4993e6f99 field initialization fix: add body for incomplete constructor 2017-03-13 13:25:41 +03:00
Bas Leijdekkers ca51903f4e make suppress intentions work in module-info.java files 2017-03-12 17:08:13 +01:00
Bas Leijdekkers d803164a12 make @SuppressWarnings work in module-info.java files 2017-03-12 17:08:13 +01:00
Bas Leijdekkers 5e8b71d109 Add module-info.java checking to "Declaration has problems in Javadoc references" inspection 2017-03-12 17:08:12 +01:00
Anna.Kozlova c719482b06 pull up inference errors when current call has no type parameters (IDEA-169316) 2017-03-09 15:04:34 +01:00
Anna.Kozlova 92d60ede85 enclosing instance check: don't check the inheritance for the class with extends/implements itself 2017-03-08 19:15:20 +01:00
Anna.Kozlova 7f4059541a precise rethrow: ensure unreachable catch sections do not participate in precise rethrow 2017-03-08 12:37:00 +01:00
Anna.Kozlova 0fa0b96dc6 no enclosing instance error for top level classes (IDEA-169088) 2017-03-08 12:37:00 +01:00
Anna.Kozlova 71cc26e25c precise rethrow with multiple exceptions in the try block (IDEA-169273) 2017-03-07 17:16:53 +01:00
Dmitry Avdeev 65ddb4c454 IDEA-164851 Inspection "redundant default parameter value assignment" does not work on all parame... 2017-03-07 18:14:58 +03:00
Anna.Kozlova 2769981fb1 expand static import for all (IDEA-169239) 2017-03-07 14:57:35 +01:00
Anna.Kozlova 8cb5670877 missed constraint on lower bound of captured wildcard (IDEA-169083) 2017-03-07 11:42:25 +01:00
Anna.Kozlova 9c3ebf16aa method reference: include super substitutor into method reference substitutor when referenced method has no type parameters (IDEA-169134) 2017-03-07 09:15:29 +01:00
Tagir Valeev ed8f4efbef ExtractChainedMapAction: more specific message; Guava FluentIterable support; Collection.forEach test 2017-03-07 13:50:45 +07:00
Anna.Kozlova af3deb08fe overload resolution: ensure cleanup both branches of conditional (IDEA-169142) 2017-03-06 15:14:54 +01:00
Roman Shevchenko 74daf8d522 [java] improves "unsupported language level" message (IDEA-168859) 2017-03-06 11:27:27 +01:00
Anna.Kozlova 5328c5fa2c final field initialization: don't treat anonymous args as inner classes (IDEA-168651) 2017-03-06 10:28:45 +01:00
Anna.Kozlova effcbfe27b overload conflicts: assume that subsignature conflicts are already resolved when most specific are checked (IDEA-168894) 2017-03-06 10:28:45 +01:00
Tagir Valeev 504a5727d6 ExtractStreamMapAction: made stream-agnostic (with ability to extend to other chaining lambda APIs like Guava, RxJava, etc.); implemented for CompletableFuture; existing lambda is always preserved now. 2017-03-06 15:32:16 +07:00
Anna.Kozlova bdb718f7cb fix visibility of private inner classes in annotations arguments of a sibling class (IDEA-168927) 2017-03-02 18:30:06 +01:00
Tagir Valeev ee38a5cfdd IDEA-168967 Intention to extract local variable created in stream operation lambda to separate stream step. 2017-03-02 16:25:35 +07:00
Tagir Valeev 1db9b2fd3f OptionalAssignedToNullInspection: added assignment test 2017-03-02 09:49:30 +07:00
Tagir Valeev 1b3489639b IDEA-168633 Warn if variable of type java.util.Optional is initialized with null 2017-03-01 16:41:41 +07:00