[ https://issues.apache.org/jira/browse/OFBIZ-11740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17284172#comment-17284172 ] Michael Brohl commented on OFBIZ-11740: --------------------------------------- We should definetely try to split those files. OrderServices for example can easily be split in OrderServices, OrderNotificationServices, OrderPaymentServices etc.. This would make the code much more readable and organized. > Handle FileLength Checkstyle rule > ---------------------------------- > > Key: OFBIZ-11740 > URL: https://issues.apache.org/jira/browse/OFBIZ-11740 > Project: OFBiz > Issue Type: Sub-task > Components: ALL COMPONENTS > Affects Versions: Trunk > Reporter: Jacques Le Roux > Priority: Minor > Attachments: filesLengths.txt > > > Hi All, > [~surajk] rightly mentioned directly to me in Slack that we have no FileLength checkstyle rule and the max default is 2000 lines: https://checkstyle.sourceforge.io/config_sizes.html#FileLength > We have some very large Java files in trunk ( see [^filesLengths.txt]) and few (19) are longer than 2000 lines: > {noformat} > 2059 ./framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java > 2131 ./applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java > 2581 ./applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearch.java > 2631 ./applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java > 2643 ./applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java > 2662 ./framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java > 2676 ./applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java > 2811 ./framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java > 2953 ./plugins/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java > 3133 ./applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java > 3433 ./framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java > 3638 ./applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java > 3712 ./applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java > 3720 ./applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java > 3734 ./applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/ups/UpsServices.java > 4417 ./framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java > 5437 ./applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java > 7194 ./applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java > {noformat} > The question is should we increase to hide the issue (19 errors) or try to split those files, if it makes sense in some cases... -- This message was sent by Atlassian Jira (v8.3.4#803005) |
Free forum by Nabble | Edit this page |