Skip to content

fix: remove malformed javadoc to fix Werror build (#7393)#7397

Closed
Senrian wants to merge 3 commits intoTheAlgorithms:masterfrom
Senrian:fix/javadoc-warnings-7393
Closed

fix: remove malformed javadoc to fix Werror build (#7393)#7397
Senrian wants to merge 3 commits intoTheAlgorithms:masterfrom
Senrian:fix/javadoc-warnings-7393

Conversation

@Senrian
Copy link
Copy Markdown
Contributor

@Senrian Senrian commented Apr 22, 2026

Fixes malformed javadoc that causes -Werror build failure.

Changes:

  • AnyBaseToAnyBase.java: Fix * * @author -> @author
  • ReverseString.java: Fix * * @param -> @param

Fixes #7393

penggaolai and others added 3 commits April 4, 2026 04:15
When searching for a non-null key in an array that contains null elements,
the sentinel linear search would throw a NullPointerException because it
called array[i].compareTo(key) without checking if array[i] is null.

Added null check for array[i] in the while loop condition to prevent NPE
and return the correct index when array elements themselves are null.

Issue: TheAlgorithms#7318 (related)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails because existing documentation warnings are treated as errors by -Werror

2 participants