- edited description
ClassImmutabilityAnalysis contains dead code
Issue #145
resolved
allSubtypes of java.lang.Object always contains all types
// 2.
// All classes that do not have complete superclass information are mutable
// due to the lack of knowledge.
val typesForWhichItMayBePossibleToComputeTheMutability =
allSubtypes(ObjectType.Object, reflexive = true)
val unexpectedRootTypes =
rootTypes.filter(rt ⇒ (rt ne ObjectType.Object) && isInterface(rt).isNo)
unexpectedRootTypes.flatMap(rt ⇒ allSubtypes(rt, reflexive = true)).view.
// For classes that directly inherit from Object, but which also
// implement unknown interface types it is possible to compute the class
// immutability
filter(ot ⇒ !typesForWhichItMayBePossibleToComputeTheMutability.contains(ot)).
foreach(ot ⇒ project.classFile(ot) foreach { cf ⇒
handleResult(Result(cf, MutableObjectDueToUnknownSupertypes))
})
Comments (5)
-
reporter -
reporter - changed status to resolved
fixes
#145→ <<cset 40e5c9467611>>
-
repo owner -
repo owner -
repo owner - removed version
Removing version: 1.1.0 (automated comment)
- Log in to comment