Skip to content

Commit

Permalink
docs(model): Fix the docs of Hash.create() for blank values
Browse files Browse the repository at this point in the history
The documented behavior is already covered by a test.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Jan 26, 2024
1 parent a09afa4 commit acb8ad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/src/main/kotlin/Hash.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ data class Hash(
val NONE = Hash(HashAlgorithm.NONE.toString(), HashAlgorithm.NONE)

/**
* Create a [Hash] instance from a known hash [value]. If the [HashAlgorithm] cannot be determined,
* [HashAlgorithm.UNKNOWN] along with the original [value] is returned.
* Create a [Hash] instance from a known hash [value]. If the [HashAlgorithm] cannot be determined, the original
* [value] is returned with [HashAlgorithm.UNKNOWN], or with [HashAlgorithm.NONE] if the value is blank.
*/
fun create(value: String): Hash {
val splitValue = value.split('-')
Expand Down

0 comments on commit acb8ad4

Please sign in to comment.