# Chapter 8 unchecked cast warning

**URL:** <https://forums.kodeco.com/t/chapter-8-unchecked-cast-warning/89778>\
**Category:** Android Apprentice\
**Created:** [November 29, 2019, 5:36pm UTC](https://forums.kodeco.com/t/chapter-8-unchecked-cast-warning/89778 "2019-11-29T17:36:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![acix](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/acix/32/81494_2.png) [@acix](https://forums.kodeco.com/u/acix)\
**Post date:** [November 29, 2019, 5:36pm UTC](https://forums.kodeco.com/t/chapter-8-unchecked-cast-warning/89778/1 "2019-11-29T17:36:35Z")

</div>

Hi,

The readLists function in ListDataManager (chapter 8) causes a “Unchecked cast Any? to kotlin.collections.HashSet” warning in:  
val itemsHashSet = ArrayList(taskList.value as HashSet)  
What is the best way to deal with that?  
TIA

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [January 12, 2020, 2:26am UTC](https://forums.kodeco.com/t/chapter-8-unchecked-cast-warning/89778/2 "2020-01-12T02:26:49Z")

</div>

@daemonic_daz Can you please help with this when you get a chance? Thank you - much appreciated! :]
