fix(docs): javadoc comments are inconsistent with code #4120
Open
Description
Note: This issue is marked as good first issue
. You should take it up only if this is your initial contribution to the Janssen Project.
Describe the bug
There are number of instances in the codebase where javadoc comments are not consistent with the actual code. For instance, here.
When we generate javadoc using mvn javadoc:javadoc
, the build log shows errors like below.
[ERROR] /home/IdeaProjects/Janssen/jans/jans-auth-server/model/src/main/java/io/jans/as/model/crypto/signature/EDDSAKeyFactory.java:127: error: exception not thrown: java.security.NoSuchProviderException
[ERROR] * @throws NoSuchProviderException
[ERROR] ^
[ERROR] /home/IdeaProjects/Janssen/jans/jans-auth-server/model/src/main/java/io/jans/as/model/crypto/signature/EDDSAKeyFactory.java:128: error: exception not thrown: java.security.NoSuchAlgorithmException
[ERROR] * @throws NoSuchAlgorithmException
[ERROR] ^
[ERROR] /home/IdeaProjects/Janssen/jans/jans-auth-server/model/src/main/java/io/jans/as/model/crypto/signature/EDDSAPublicKey.java:36: error: @param name not found
[ERROR] * @param publicKeyData
Regular builds don't fail due to errors like the above as modules have configured the javadoc plug-in in their pom.xml
as below. As a result, the build goes through and generates the wrong javadocs.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>
To Reproduce
Steps to reproduce the behavior:
- Find and comment out
<failOnError>false</failOnError>
configuration for javadoc plug-in across module pom files - Now run
mvn javadoc:javadoc
for each module one-by-one - Look for errors like the ones shown above in the build log.
Expected behavior
javadoc comments should be updated to be consistent with the code
Metadata
Assignees
Labels
Documentation needs to change as part of issue or PRRelative effort required for completion of issue or PRGood for newcomersExtra attention is neededPull requests that update Java codeIssue or PR is a bug in existing functionalityMinor issue or PR is not relevant to core functions, or relates to the usability of systemIssue or PR is fully triaged
Activity