Commit Graph
5790 Commits
Author SHA1 Message Date
Anna Kozlova f28bfb5bcb redundant type arguments: check all methods applicability till top level (IDEA-166696) 2017-01-20 12:58:32 +03:00
Tagir Valeev bf1f12619f IDEA-166888 Report useless Stream or Optional intermediate operations 2017-01-20 11:32:48 +07:00
peter b814473c58 java completion: suggest expected method type arguments (IDEA-166668) 2017-01-19 20:40:38 +01:00
Tagir Valeev 327e51962b IDEA-166814 Stream API migration: support more post-loop steps 2017-01-19 14:14:20 +07:00
peter 59bdc4b5ab IDEA-166444 Good code yellow: Not annotated method with primitive return type is used as an override for a method annotated with NotNull 2017-01-18 19:42:15 +01:00
peter ab22b9b3ac IDEA-166582 No completion inside lambda when instance of contains lambda 2017-01-18 19:42:14 +01:00
Dmitry Batkovich b8d81c260a java usages highlighting: add an additional test for multiple jdk configuration 2017-01-18 19:47:29 +03:00
Dmitry Batkovich de021824a4 java highlight usages in file: highlight usages of a method when its super method is from alternative jdk 2017-01-18 19:17:19 +03:00
Anna Kozlova e323aa8b9c lambda -> method ref: don't transform by default array access qualifiers (IDEA-166740) 2017-01-18 19:11:49 +03:00
Anna Kozlova 560b5b0265 provide accessibility and static modifier fixes for method references (IDEA-166707) 2017-01-18 16:55:38 +03:00
Anna Kozlova ecedc9baf6 visibility: fix target 2017-01-18 13:29:49 +03:00
Anna Kozlova b451348edc fix testdata 2017-01-18 13:29:49 +03:00
Anna Kozlova 8913e40ed1 ground type for explicitly typed lambda: add sam to target class substitution (IDEA-166662) 2017-01-18 12:11:17 +03:00
Anna Kozlova 0339448167 diamonds with anonymous: ensure base type calculated over tree cause too much context should be created otherwise (IDEA-166600) 2017-01-18 11:21:35 +03:00
Anna Kozlova 326ad95830 compose throws list on override: ignore supers of super method, ensure same thrown types do not appear in the list (IDEA-166623) 2017-01-18 11:21:34 +03:00
Anna Kozlova 5a23cba5fa unused declaration: ensure unused local variables are reported inside entry points; suppress works for locals (IDEA-166622) 2017-01-18 11:21:34 +03:00
Tagir Valeev cbd273dda8 StreamApiMigration: minor fixes in FindFirst scenarios 2017-01-18 13:52:12 +07:00
Tagir Valeev 4c07a74eb5 CommentTracker: better whitespace handling 2017-01-18 13:52:11 +07:00
Tagir Valeev 59923c803f IDEA-160448 Simplify groupingBy-collectingAndThen-Optional.get Collectors chain 2017-01-18 11:07:13 +07:00
Pavel Dolgov ce236e3666 Java: Don't offer "Unwrap 'else' branch" intention if it might cause unreachable code (IDEA-165428) 2017-01-17 16:36:08 +03:00
Tagir Valeev 97bf215035 SimplifyStreamApiCallChainsInspection: remove support of user-defined collections as it could be incorrect (IDEA-CR-17005) 2017-01-17 15:45:04 +07:00
peter 9ccfc30d74 remember completion method statistics per qualifier type (alas, undoing IDEA-87104)
otherwise methods from base classes get preferred over more relevant ones

example: Object methods like equals/getClass would be preselected when invoking a completion in a just created class, instead of its own methods
2017-01-17 09:24:44 +01:00
peter f85b52691f make completion stats prefix-independent, make prefix more important a weighing criterion (IDEA-165932, also needed for IDEA-166442) 2017-01-17 09:24:43 +01:00
Tagir Valeev 337d16d1a9 IDEA-163460 Recognize patterns convertible to Arrays.setAll() 2017-01-17 12:50:10 +07:00
Tagir Valeev d29a7fef56 SimplifyStreamApiCallChainsInspectionTest#IterateListUnbox fixed (forgot to update expected result) 2017-01-17 09:41:54 +07:00
Tagir Valeev a363362459 StreamApiMigration: automatically simplify IntStream.range().mapXyz chains; IndexedContainer#getElementType: do not erase 2017-01-16 17:43:50 +07:00
Tagir Valeev 9d9608f5e0 Fix replace with computeIfAbsent when resulting var is not used (see also IDEA-166625) 2017-01-16 15:28:40 +07:00
Tagir Valeev 8924fda614 StreamToLoopInspection: fixed unqualified reference to stream() method handling 2017-01-16 14:44:34 +07:00
Tagir Valeev 4aaa6a4cc2 IDEA-166636 A bunch of bugs in TrivialFunctionalExpressionUsageInspection (Method call can be simplified) 2017-01-16 12:52:08 +07:00
Anna Kozlova 1700f14d67 create class from new: put caret on name (IDEA-166356) 2017-01-13 16:24:36 +01:00
Dmitry Batkovich 55ab006770 fix test data 2017-01-13 15:36:12 +03:00
Pavel Dolgov 37b6fb9405 Java: Implemented "Inline 'else' code branch" intention (IDEA-165428) 2017-01-13 14:42:07 +03:00
Tagir Valeev ed5189e166 IDEA-166577 Convert patterns like IntStream.range(0, array.length).mapToObj(idx -> array[idx]) to Arrays.stream(array) 2017-01-13 17:46:27 +07:00
Pavel Dolgov 93e109126a Java: Simplified handling the parentheses in the quick-fix Collection.toArray() (IDEA-163341) 2017-01-13 12:43:30 +03:00
Pavel Dolgov 85e93b585f Java: When generating return statement where the returned type is a type parameter array (like T[]) don't suggest Collection.toArray() (IDEA-163341) 2017-01-13 12:22:32 +03:00
Pavel Dolgov 83b5637a43 Java: Don't offer the quick-fix Collection.toArray() for type parameter arrays (like T[]) (IDEA-163341) 2017-01-13 12:22:32 +03:00
Tagir Valeev 67964b82d4 ForCanBeForeachInspection: fixed incorrect merge conflict resolution; ForCanBeForeachInspectionFixTest merged with ForCanBeForeachFixTest 2017-01-13 14:19:41 +07:00
Tagir Valeev 1638590aad ExpressionUtils#getQualifierOrThis; ForCanBeForeachInspection & WhileCanBeForeachInspection fixed to handle unqualified calls in nested classes; cosmetics; tests for ForCanBeForeachInspection quick fix 2017-01-13 13:28:31 +07:00
Anna Kozlova 52f8c8aeb1 visibility inspection: forbid make protected if used qualified outside package (IDEA-166106) 2017-01-12 16:57:35 +01:00
Anna Kozlova 7d8df26aed surround with array fix: ensure result is free from generics array creation error (IDEA-166489; IDEA-166490) 2017-01-12 16:57:35 +01:00
Eugene Zhuravlev 368304f819 move class handling changed: classes that directly depend on removed sources are now compiled in the first compilation round (IDEA-165813) 2017-01-12 13:25:41 +01:00
Anna Kozlova 65ac360725 javac 1.7 bug workaround: give error for language level 1.7 despite of java 1.8 would compile the code (IDEA-166358) 2017-01-12 12:02:35 +01:00
Tagir Valeev 5b04785164 IDEA-166499 Stream API migration: support array filling in a loop 2017-01-12 17:37:10 +07:00
Tagir Valeev 5a599cdffd IDEA-166424 Guava create collections , nonsupport replace with stream API 2017-01-12 11:55:44 +07:00
Tagir Valeev 347bd66e81 StreamApiMigrationInspection: enable flatMap with primitive type change 2017-01-12 11:18:29 +07:00
Tagir Valeev 0957d52585 Convert for-loop with Collections.addAll: support primitive types; switch off when count expression is used; wrong contracts removed 2017-01-12 11:04:58 +07:00
Pavel Dolgov 26a7739891 Java: Implemented the quick-fix Collection.toArray() that is offered in the context where an array is required but a collection is provided (IDEA-163341) 2017-01-11 16:43:18 +03:00
Anna.Kozlova 23c0f28705 change signature: don't ask about covariant overrides when types are equal, e.g. when super type is changed based on override method return type
type annotations: ensure annotations are cloned so invalidating initial type doesn't break the consequence refactoring
EA-93296 - PIEAE: PsiUtilCore.ensureValid
2017-01-11 12:58:26 +01:00
Anna.Kozlova 15dbccb971 inline constant: ensure initial initializer is not changed
EA-93434 - IOE: CheckUtil.checkWritable
2017-01-11 12:58:26 +01:00
Pavel Dolgov af46d7d411 Java: When generating return statement where the returned type is a primitive array don't suggest Collection.toArray() (IDEA-163341) 2017-01-11 12:33:51 +03:00