File Name Matches Type (ARCH4005)
Key java.naming.file-name-matches-type · Severity info · Category naming
In Java a source file’s name should match its primary top-level type. When it doesn’t, navigation and reading the codebase become harder.
Incorrect
Section titled “Incorrect”public class OrderService { // does not match file name void place() { }}Correct
Section titled “Correct”public class OrderService { void place() { }}Rename the file to match its primary public type (minus the extension).