Consistent naming of Utility classes
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 487
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 15
Description
It would be nice if all of our static utility classes were named consistently `*Util.java` while other plain old Java Object (POJO) type classes were named differently. Most of them seem to follow this naming convention but not all. We have about 50 utility classes.
09:49:00 (main) ~/workspace/accumulo$ find core/src/main/java/org/apache/accumulo/core/util/ -name "*Util.java"
core/src/main/java/org/apache/accumulo/core/util/ShutdownUtil.java
core/src/main/java/org/apache/accumulo/core/util/TextUtil.java
core/src/main/java/org/apache/accumulo/core/util/cleaner/CleanerUtil.java
core/src/main/java/org/apache/accumulo/core/util/ByteBufferUtil.java
core/src/main/java/org/apache/accumulo/core/util/AddressUtil.java
core/src/main/java/org/apache/accumulo/core/util/CompletableFutureUtil.java
core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
core/src/main/java/org/apache/accumulo/core/util/MonitorUtil.java
core/src/main/java/org/apache/accumulo/core/util/NumUtil.java
core/src/main/java/org/apache/accumulo/core/util/compaction/ExternalCompactionUtil.java
core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
`AdminUtil` is a POJO so should probably be renamed. The advantage of renaming classes is so its clear which classes are static utilities and which are objects that can be shared, instantiated and made private final members of other classes.
Contributor guide
Research direction
Start by reviewing core/src/main/java/org/apache/accumulo/core/util/ and the listed *Util.java classes, then inspect AdminUtil and its references to distinguish POJOs from static utilities. Done means applying the naming convention consistently across the utility classes while preserving references and using different names for POJO types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100