tsantalis / JDeodorant

JDeodorant
https://marketplace.eclipse.org/content/jdeodorant
MIT License
139 stars 59 forks source link

Extract Class refactoring does not support final initialization with a field or a static function call. #77

Closed 123a6bcw closed 4 years ago

123a6bcw commented 4 years ago

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).

tsantalis commented 4 years ago

Thanks @123a6bcw for the bug report. I am getting 404 Page not found for all provided links. Is it possible to update the links?

123a6bcw commented 4 years ago

@tsantalis Sorry! Files were moved to master. I updated the links.