In ExtractClassRefactoring::createExtractedTypeFieldReferenceInSourceClass()
considered a possibility of a final field being initialized with either constructor parameter or a local variable. However, a final field can also be initialized with another final field, here's an example initial class expected source class expected product class
In ExtractClassRefactoring::createExtractedTypeFieldReferenceInSourceClass()
considered a possibility of a final field being initialized with either constructor parameter or a local variable. However, a final field can also be initialized with another final field, here's an example
initial class
expected source class
expected product class
It is also possible to initialize a final field with a static function call. initial class
expected source class
expected product class
JDeodorant will give error results in such cases (in both cases I used the first refactoring proposal).