Skip to content

Faker().text().text(1, 64, true, false, true) returns empty String when length is 1 #1659

@axelfontaine

Description

@axelfontaine

Describe the bug
Faker().text().text(1, 64, true, false, true) returns empty String when length is 1.

To Reproduce

(1..1000).forEach { _ -> check(Faker().text().text(1, 64, true, false, true).isNotEmpty()) }

Expected behaviour
A fake text according to the specifications.

Versions:

  • JDK: 24
  • Faker Version: 2.5.0

Additional context
It happens here: https://github.com/datafaker-net/datafaker/blob/main/src/main/java/net/datafaker/providers/base/Text.java#L206

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions