I'm maintaining a Java class that's 40K lines long.. problem?

后端 未结 12 1458
北海茫月
北海茫月 2021-02-04 01:02

This may be a subjective question leading to deletion but I would really like some feedback.

Recently, I moved to another very large enterprise project where I work as a

12条回答
  •  太阳男子
    2021-02-04 01:22

    This is definitely not right. A method should not contain more code than sufficient for a single unit of work. A class should not contain more methods than the ones related to the state of the class' instance.

    This is too much like God Object anti-pattern. I would personally drop the project and look for another.

提交回复
热议问题