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

后端 未结 12 1459
北海茫月
北海茫月 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:18

    Here are the ten largest class in the JDK 6 by line count of 7209 .java files. These classes include significant amount of comments which could be longer than the code.

    4495 ./javax/sql/rowset/BaseRowSet.java
    4649 ./java/awt/Container.java
    5025 ./javax/swing/text/JTextComponent.java
    5246 ./java/util/regex/Pattern.java
    5316 ./javax/swing/JTree.java
    5469 ./java/lang/Character.java
    5473 ./javax/swing/JComponent.java
    9063 ./com/sun/corba/se/impl/logging/ORBUtilSystemException.java
    9595 ./javax/swing/JTable.java
    9982 ./java/awt/Component.java
    

    I would agree one printed page is long enough for a method. There really should not be a need for classes over 10K lines long IMHO.

提交回复
热议问题