Skip to content

fix(docs): javadoc comments are inconsistent with code #4120

Open
@ossdhaval

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:

  1. Find and comment out <failOnError>false</failOnError> configuration for javadoc plug-in across module pom files
  2. Now run mvn javadoc:javadoc for each module one-by-one
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area-documentationDocumentation needs to change as part of issue or PReffort-2Relative effort required for completion of issue or PRgood first issueGood for newcomershelp wantedExtra attention is neededjavaPull requests that update Java codekind-bugIssue or PR is a bug in existing functionalitypriority-4Minor issue or PR is not relevant to core functions, or relates to the usability of systemtriagedIssue or PR is fully triaged

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions