Anna Kozlova and intellij-monorepo-bot
0314adac6d
java: redundant cast: don't check casts against non-denotable types
...
GitOrigin-RevId: ba1ac48a92057ae13f2694a6667e576ca1328134
2020-05-20 06:38:50 +00:00
Anna Kozlova and intellij-monorepo-bot
4b5272c14a
java: redundant cast: check inference problems in cast operand
...
expected type (available after removing type cast) may add bounds for inference variables which would lead to errors after applying the fix
GitOrigin-RevId: 24a97411b7175cacabd8e81ed5711509195dfd4d
2020-05-15 20:27:18 +00:00
Anna Kozlova and intellij-monorepo-bot
2bc23faf05
java: redundant cast: preserve exact types for functional expressions
...
otherwise we may loose serialization or miss compilation errors in lambda body
GitOrigin-RevId: 180e0ee713a19c42abecf1228616bbd6754ea3b8
2020-05-15 08:33:44 +00:00
Anna Kozlova and intellij-monorepo-bot
c879ed4e4a
java redundant cast: preserve multiple type casts around functional interface when if expected type is the same as cast
...
isAssignable check may fail otherwise
GitOrigin-RevId: d02c9d50645a2bbb0e957f077a4a66813c94afd6
2020-05-11 20:09:58 +00:00
Anna Kozlova and intellij-monorepo-bot
7f02ca14a9
java redundant cast: check conditional expression as call argument inplace
...
GitOrigin-RevId: ee7fa6ef4cac4e39e9dad97c7d5ace983bc81044
2020-05-11 08:33:17 +00:00
Anna Kozlova and intellij-monorepo-bot
e3bc888dc7
java redundant cast: cleanup checks for calls
...
GitOrigin-RevId: 2d999bc7356856ef7d2fea45f793d69f401f7256
2020-05-11 08:33:17 +00:00
Anna Kozlova and intellij-monorepo-bot
78891be4bb
java redundant cast: cleanup: extract conditional
...
GitOrigin-RevId: ca95c0e70c197e27943596e91df8d526bbfbf1bb
2020-05-11 08:33:17 +00:00
Anna Kozlova and intellij-monorepo-bot
efc6106e02
java redundant cast: cleanup: avoid dbl cast registration for expressions with expected type
...
GitOrigin-RevId: a31b1d892b2e19bfaf556e85724eb244189111b4
2020-05-11 08:33:17 +00:00
Anna Kozlova and intellij-monorepo-bot
fdc80d017c
java redundant cast: fixed multiple casts in synchronized stmt
...
GitOrigin-RevId: 49a7d8dbcd26a3aa905c57db97d386bcbd285464
2020-05-11 08:33:17 +00:00
Anna Kozlova and intellij-monorepo-bot
1c35803b4a
java redundant cast: cleanup: extract foreach, instanceof, throws statements
...
GitOrigin-RevId: ac04ea8db453518f4c15d3e37e33d9a25a22ce35
2020-05-11 08:33:17 +00:00
Anna Kozlova and intellij-monorepo-bot
0a41902bda
java redundant cast: normalize parenthesis
...
GitOrigin-RevId: 8069758686e0e76c3aed4d6851914315d29a493e
2020-05-05 21:49:48 +00:00
Anna Kozlova and intellij-monorepo-bot
c2ec0c2e78
java redundant cast: forbid changing of substitutor if cast is removed (IDEA-184330)
...
this way neighbour functional expressions can't be broken
GitOrigin-RevId: c13823eca79157030f3dde53fa6a6d496be9c2b7
2020-05-05 21:49:48 +00:00
Anna Kozlova and intellij-monorepo-bot
349c96eaee
java redundant cast: allow warnings in poly conditional when target type remains the same
...
GitOrigin-RevId: f953fc42882a1eaad0b0a8c65d1e94236f0ec99e
2020-05-05 11:29:06 +00:00
Anna Kozlova and intellij-monorepo-bot
462856d81c
java: ensure that lambda parameters are available inside lambdabody.copy() (IDEA-222542)
...
GitOrigin-RevId: b31c6c8484d8e77e96dfad104b08ce13631ddeaa
2020-05-05 07:04:28 +00:00
Anna Kozlova and intellij-monorepo-bot
02d7164d3b
java redundant cast: check erased context (IDEA-205885)
...
GitOrigin-RevId: 1dd464c7b8feba43181c9e60472170b2bbbaa72e
2020-05-04 20:49:32 +00:00
Tagir Valeev
1327600ef4
IDEA-205881 Remove redundant cast leads to incompilable code
2019-03-22 10:44:54 +07:00
Anna Kozlova
201de8dd01
redundant cast: trim too long messages (IDEA-182666)
2018-06-19 13:18:27 +03:00
Anna.Kozlova
be6d0a2981
false positive in redundant cast: applicable method with inference error (IDEA-186224)
2018-02-07 09:44:28 +01:00
Anna Kozlova
f1536bb969
use lambda to avoid context remapping (IDEA-185448)
...
for anonymous class this expressions have to be encoded to point to outer class, for lambda expressions there is no need for that. Leave unchanged (array initializer) for old java versions
2018-01-30 19:38:53 +03:00
Anna Kozlova
605dfb1c3c
redundant cast: ensure cast type compared with ground type (IDEA-174369)
...
remove attempts to emulate that and reuse getGroundTargetType api
2017-06-13 20:27:13 +03:00
Anna.Kozlova
27ca3fe565
ensure enum constants resolved inside enum class
...
EA-83687 - assert: PsiEnumConstantImpl.resolveMethodGenerics
2017-02-17 19:37:21 +01:00
Anna.Kozlova
031f71c5b3
redundant cast: don't highlight conditional with functional branches (IDEA-161971)
2016-10-04 18:45:14 +02:00
Anna Kozlova
7f8b5f8952
redundant cast: process branches of conditional expressions with respect to expected type for functional expressions (IDEA-156480)
2016-05-25 18:40:17 +03:00
Anna.Kozlova
b936f89275
redundant cast: ensure cast is not removed if operand changes it's type
2016-04-29 14:41:28 +02:00
Anna.Kozlova
e07b25baba
testdata for IDEA-153701
2016-04-21 14:33:04 +02:00
Anna.Kozlova
401ec5dbfa
redundant cast: restoring call by top level, let's search by arg list offset in order to avoid finding method calls from qualifiers
2016-04-20 17:49:29 +02:00
Anna.Kozlova
2dead05e6b
treeWalkUp: stop at member level to avoid skipping anonymous classes
2016-04-19 20:02:32 +02:00
Anna.Kozlova
4c06b785c0
testdata for IDEA-154861
2016-04-18 12:54:50 +02:00
Anna.Kozlova
43fc40c4a5
anonym -> lambda, redundant cast, redundant type args: process top level overloads (IDEA-152766);
...
rearrange utils
2016-04-15 18:43:24 +02:00
Anna.Kozlova
09f46115cf
redundant cast: special processing for functional expressions as enum args (IDEA-154354)
2016-04-15 18:43:24 +02:00
Anna.Kozlova
395c55df75
testdata for IDEA-150754
2016-03-18 15:50:22 +01:00
Anna.Kozlova
ec5245ed00
redundant cast: recapture wildcards for non-physical elements (IDEA-153166)
2016-03-17 18:04:01 +01:00
Anna Kozlova
23df4bf2a1
redundant cast: open capture to compare old and new result types
2016-03-11 10:51:37 +01:00
Anna Kozlova
320904a20f
redundant cast: compare base types for anonymous classes
2016-03-11 10:51:37 +01:00
Anna Kozlova
46c29366cb
additional testdata (following IDEA-CR-8743)
2016-03-03 15:22:36 +01:00
Anna Kozlova
6e9234b115
redundant casts: don't treat cast as redundant if functional expression get more specific type (IDEA-152093)
2016-02-24 21:05:13 +01:00
Anna Kozlova
a93ad570ca
semantic cast to &Serializable for functional expressions is not redundant even if expression is inside parenthesis (IDEA-143922)
2015-08-20 19:31:05 +02:00
Anna Kozlova
ad840dea8a
redundant cast: don't warn if functional expression corresponds to another interface method (IDEA-140218)
2015-05-13 14:39:06 +02:00
Anna Kozlova
f5cec5e24a
intersection in cast type: repeat interface, different parameterization checks
2015-04-20 10:19:22 +02:00
Anna Kozlova
232b479b23
testdata for IDEA-139318
2015-04-16 20:30:37 +02:00
Anna Kozlova
09f4d7ea1f
detect expected type by parent for nested array initializers (IDEA-139280)
2015-04-16 20:30:31 +02:00
Anna Kozlova
6047478cae
redundant cast: do not raise if result in bad return type in lambda expression (IDEA-138927)
2015-04-08 21:14:33 +02:00
Anna Kozlova
80e3760c69
redundant cast: ensure lambda return statements are not mixed with those from containing method (IDEA-138724)
2015-04-02 18:06:41 +02:00
Anna Kozlova
89d1df1dc0
redundant casts in lambda return expressions (IDEA-132723)
2014-11-12 13:13:33 +01:00
anna
d67a21f788
redundant cast: ignore for lambda casts with serializable/intersections (IDEA-105839)
2013-04-22 18:00:30 +02:00