Skip to content

TestPropertyValues.Pair.fromMapEntry(Entry<String, String>) does not comply with its nullability contract #48948

@wilkinsona

Description

@wilkinsona

The contract states that a non-null Map Entry will produce a non-null Pair, however this test fails:

@Test
void pairFromMapEntryWithEmptyKey() {
	Pair pair = Pair.fromMapEntry(entry("", "empty-key"));
	assertThat(pair).isNotNull();
}

We'll have to decide if we want to change the contract or the implementation. Technically speaking, both are breaking changes. I suspect that a change to the contract would affect fewer people but changing the implementation feels like it might be the better fix.

Metadata

Metadata

Assignees

Labels

status: team-onlyAn issue that's best handled directly by the team rather than a community contribution.type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions