You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
896 B
24 lines
896 B
3 years ago
|
---
|
||
|
title: "Immutable Cast"
|
||
|
description: "Detection of object cast from immutable types to mutable types. For instance, it will detect casts from `ImmutableList` to `List`, `ImmutableMap` to `Map`, and `ImmutableSet` to `Set`."
|
||
|
---
|
||
|
|
||
|
Detection of object cast from immutable types to mutable types. For instance, it will detect casts from `ImmutableList` to `List`, `ImmutableMap` to `Map`, and `ImmutableSet` to `Set`.
|
||
|
|
||
|
**\*\*\*DEPRECATED\*\*\*** Unmaintained due to poor actionability of the reports.
|
||
|
|
||
|
Activate with `--immutable-cast`.
|
||
|
|
||
|
Supported languages:
|
||
|
- C/C++/ObjC: No
|
||
|
- C#/.Net: Yes
|
||
|
- Erlang: No
|
||
|
- Java: Yes
|
||
|
|
||
|
Casts flagged by this checker are unsafe because calling mutation operations on the cast objects will fail at runtime.
|
||
|
|
||
|
## List of Issue Types
|
||
|
|
||
|
The following issue types are reported by this checker:
|
||
|
- [CHECKERS_IMMUTABLE_CAST](/docs/next/all-issue-types#checkers_immutable_cast)
|