You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2023/12/10 18:01:00 UTC
[jira] [Resolved] (HDDS-9841) Increase checkstyle LineLength
[ https://issues.apache.org/jira/browse/HDDS-9841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz-wo Sze resolved HDDS-9841.
------------------------------
Resolution: Duplicate
Resolving this as a duplicate of HDDS-3583.
> Increase checkstyle LineLength
> ------------------------------
>
> Key: HDDS-9841
> URL: https://issues.apache.org/jira/browse/HDDS-9841
> Project: Apache Ozone
> Issue Type: Improvement
> Components: build
> Reporter: Tsz-wo Sze
> Assignee: Tsz-wo Sze
> Priority: Major
> Labels: pull-request-available
>
> In Ozone, we have many ugly code like the following in order to satisfy the 80 line width requirement.
> {code}
> //StorageContainerManager.java
> FixedThreadPoolWithAffinityExecutor<IncrementalContainerReportFromDatanode,
> ContainerReport> incrementalReportExecutors =
> new FixedThreadPoolWithAffinityExecutor<>(
> EventQueue.getExecutorName(
> SCMEvents.INCREMENTAL_CONTAINER_REPORT,
> incrementalContainerReportHandler),
> incrementalContainerReportHandler, queues, eventQueue,
> IncrementalContainerReportFromDatanode.class, executors,
> reportExecutorMap);
> {code}
> Ugly code, is not only a cosmetic issue, leads to more bugs since it makes the code harder to read.
> We are currently following the Sun Code Conventions
> - https://www.oracle.com/java/technologies/javase/codeconventions-indentation.html#313
> which says
> - 4.1 Line Length
> -* Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools.
> This is probably true 20+ years ago. (It might be true for the old SUN workstations?)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org