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
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
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
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
Tagir Valeev
1ee8a1fbfe
IDEA-166211 Convert for-loop with Collections.addAll inside into Java 8's stream API calls chain
2017-01-11 15:57:54 +07:00
Tagir Valeev
b3a181a091
StreamApiMigrationInspection: refactoring of collect scenarios: CollectTerminal interface extracted and used; all forEach scenarios moved to ForEachMigration; cosmetics
2017-01-11 14:37:50 +07:00
Anna.Kozlova
977c4cc924
clashing return type of overriding methods: fix unchecked override comparison (IDEA-166355)
2017-01-10 15:43:36 +01:00
Pavel Dolgov
6b7992b4ce
Java: When generating return statement where the returned type is an array suggest Collection.toArray() if there's no better option (IDEA-163341)
2017-01-10 12:37:42 +03:00
Tagir Valeev
3738e54fee
StreamApiMigration: add parentheses if necessary when .stream() can be omitted (fix for EA-93812).
2017-01-10 09:42:03 +06:00
Anna.Kozlova
7356d1d8c3
used variable before static initializer (IDEA-166270)
2017-01-09 18:15:16 +01:00
Anna.Kozlova
ab1a47ddef
highlight unused fields implicitly assigned by extension (IDEA-166091)
2017-01-02 14:25:16 +01:00
Anna.Kozlova
178e834fb9
checked exception compatibility constraint: don't substitute with inferred variables as types are already constructed based on substituted values, so avoid dbl substitution which leads to errors in case of references to the containing method (IDEA-166104)
2017-01-02 12:27:12 +01:00
Tagir Valeev
38db92f734
UseBulkOperationInspection: register BulkMethodInfo via extension points; JPA classes extracted
2016-12-30 17:48:49 +07:00
Tagir Valeev
5e742cdfac
StreamToLoopInspection: reuse final variable as non-final (removing "final" keyword) (IDEA-CR-17006)
2016-12-30 15:09:55 +07:00
Tagir Valeev
a613a9253d
UseBulkOperationInspection: qualifier expression checked; arrays support fixed for CrudRepository.save
2016-12-30 14:02:55 +07:00
Tagir Valeev
01d7ee7d3c
IDEA-165942 Inspection to replace method call in a loop with bulk operation
2016-12-30 13:01:31 +07:00
Anna.Kozlova
1cf721e0ce
string comparison: evaluate based on equals comparison (IDEA-160823)
2016-12-28 18:49:05 +01:00
Anna.Kozlova
9a669f36ad
error if static on-demand import references non-class (IDEA-160943)
2016-12-28 17:08:19 +01:00
Anna.Kozlova
f6364fbc68
method hierarchy with generics methods: fix adapting substitutor (IDEA-165969)
2016-12-28 14:20:06 +01:00
Tagir Valeev
2c57d04054
StringConcatenationInLoopsInspectionFix: fixed parenthesized append (IDEA-165968), fix renamed to "Convert variable ''{0}'' from String to {1}"
2016-12-28 13:40:03 +07:00
Anna.Kozlova
9d9c62523d
warn about static methods in interface with same erasure (IDEA-165927)
2016-12-27 14:47:58 +01:00
Anna.Kozlova
a59edc4e4a
accessibility check for annotation parameters: treat parameters as they are outside the class (IDEA-165904)
2016-12-27 14:47:58 +01:00
Tagir Valeev
d707262f9d
StreamToLoop: merge sorted().toArray() and sorted().collect(Collectors.toList()) into single step
2016-12-27 17:47:44 +07:00
Anna.Kozlova
8f533a3edc
overload resolution: don't ignore method with incorrect number of parameters when it overrides vararg method (IDEA-165829)
2016-12-27 11:29:37 +01:00
Tagir Valeev
54eb6ce6af
StreamToLoop: support condition inside flatMap
2016-12-27 14:40:01 +07:00
Tagir Valeev
96cf01152f
StreamToLoop/ToPrimitiveArrayTerminalOperation: reassign final array making it possible to reuse existing variable
2016-12-27 13:58:09 +07:00
Tagir Valeev
ae5d133904
StreamToLoopInspection: sorted() operation (currently for non-primitive streams only)
2016-12-27 13:13:53 +07:00
Tagir Valeev
fb12495825
StreamToLoopInspection: unwrap && and || chains; copy return statement in found/not found places; do not eagerly evaluate non-trivial ternary branch
2016-12-27 12:38:05 +07:00
Anna.Kozlova
341b97a5b2
exact method refs: mark as not exact if on raw type
2016-12-23 19:37:48 +01:00
Tagir Valeev
c9c574e428
StreamToLoopInspection: preserve comments; CommentTracker: now possible to delete element first and only after that register unchanged parts.
2016-12-23 18:09:43 +07:00
Tagir Valeev
1e33755e09
StreamToLoopInspection: reuse existing variable if we should reassign it in loop, but it's possible to use it as non-final
2016-12-23 13:30:08 +07:00
peter
66b8d67f53
IDEA-165067 Unwrapping 'if' leads to non-compilable code
2016-12-22 14:06:29 +01:00
Tagir Valeev
9cae3c25fa
IDEA-165790 Stream API migration: support distinct() with collect(toList())
2016-12-22 16:33:06 +07:00
Tagir Valeev
e2b7d60680
StreamApiMigrationInspection: support limit count with separate variable
2016-12-22 12:33:15 +07:00
Tagir Valeev
fb7790606c
StreamApiMigrationInspection: try continue extracting operations when limit is successfully peeled off
2016-12-21 16:04:42 +07:00
Tagir Valeev
6341a52ccd
StreamApiMigrationInspection: support postfix limit conversion (like if(count++ > 100) break; => limit(102)) (IDEA-CR-16910)
2016-12-21 13:45:42 +07:00
Tagir Valeev
a15916ae24
IDEA-165063 Stream API migration: support simple limit conversions
2016-12-20 16:31:57 +07:00
Tagir Valeev
e778bb8680
StreamApiMigrationInspection: chained computeIfAbsent generated incorrect code
2016-12-20 10:56:31 +07:00
Tagir Valeev
7ebe6f583d
StreamToLoop: fixed comparator parentheses wrapping; ParenthesesUtils changes reverted (unnecessary)
2016-12-20 09:48:30 +07:00
peter
8d4406a15e
IDEA-165594 Auto completion adds unnecessary spaces before and after colon in case of method reference
2016-12-19 15:47:42 +01:00
Tagir Valeev
a94e87e968
StreamToLoop: inline simple common method references
2016-12-19 18:43:21 +07:00