do not cast immutable set as unmodifiable set

This commit is contained in:
alexcrea 2025-07-10 04:00:18 +02:00
parent b1efb68304
commit ce8bda9f63
Signed by: alexcrea
GPG key ID: E346CD16413450E3
3 changed files with 5 additions and 5 deletions

View file

@ -65,7 +65,7 @@ abstract class AbstractMaterialGroup(private val name: String) {
/**
* Get the group contained item as a set
*/
abstract fun getItemTypes(): ImmutableSet<ItemType>
abstract fun getItemTypes(): Set<ItemType>
/**
* Get the group non-inherited items as a set

View file

@ -69,8 +69,8 @@ class ExcludeGroup(name: String) : AbstractMaterialGroup(name) {
}
}
override fun getItemTypes(): ImmutableSet<ItemType> {
return Collections.unmodifiableSet(groupItems) as ImmutableSet<ItemType>
override fun getItemTypes(): Set<ItemType> {
return Collections.unmodifiableSet(groupItems)
}

View file

@ -68,8 +68,8 @@ class IncludeGroup(name: String) : AbstractMaterialGroup(name) {
}
}
override fun getItemTypes(): ImmutableSet<ItemType> {
return Collections.unmodifiableSet(groupItems) as ImmutableSet<ItemType>
override fun getItemTypes(): Set<ItemType> {
return Collections.unmodifiableSet(groupItems)
}