-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Closed
Copy link
Description
Besides just of properties, in SiteUtil, getPropertiesJavadocs also gets the DetailNode of entire javadoc of module.
We could correspondingly rename that method and change its javadoc description. Furthermore, splitting that method into two could be considered.
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java
Lines 440 to 475 in 77aafae
| /** | |
| * Get the javadocs of the properties of the module. If the property is not present in the | |
| * module, then the javadoc of the property from the superclass(es) is used. | |
| * | |
| * @param properties the properties of the module. | |
| * @param moduleName the name of the module. | |
| * @param modulePath the module file path. | |
| * @return the javadocs of the properties of the module. | |
| * @throws MacroExecutionException if an error occurs during processing. | |
| */ | |
| public static Map<String, DetailNode> getPropertiesJavadocs(Set<String> properties, | |
| String moduleName, Path modulePath) | |
| throws MacroExecutionException { | |
| // lazy initialization | |
| if (SUPER_CLASS_PROPERTIES_JAVADOCS.isEmpty()) { | |
| processSuperclasses(); | |
| } | |
| processModule(moduleName, modulePath); | |
| final Map<String, DetailNode> unmodifiableJavadocs = | |
| ClassAndPropertiesSettersJavadocScraper.getJavadocsForModuleOrProperty(); | |
| final Map<String, DetailNode> javadocs = new LinkedHashMap<>(unmodifiableJavadocs); | |
| properties.forEach(property -> { | |
| final DetailNode superClassPropertyJavadoc = | |
| SUPER_CLASS_PROPERTIES_JAVADOCS.get(property); | |
| if (superClassPropertyJavadoc != null) { | |
| javadocs.putIfAbsent(property, superClassPropertyJavadoc); | |
| } | |
| }); | |
| assertAllPropertySetterJavadocsAreFound(properties, moduleName, javadocs); | |
| return javadocs; | |
| } |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done