Skip to content

test: run MapPropertyTest.testGetPropertyTypeOfStringElements - #6847

Open
sharanggupta wants to merge 1 commit into
apache:masterfrom
sharanggupta:map-property-missing-test
Open

sharanggupta wants to merge 1 commit into
apache:masterfrom
sharanggupta:map-property-missing-test

Conversation

@sharanggupta

Copy link
Copy Markdown

Description

MapPropertyTest.testGetPropertyTypeOfStringElements was added without @Test in d3a0d32 (2018), so it never ran. Its name says string elements but it used Integer values, so it now uses String values, which a MapProperty stores as StringProperty. MapProperty.getPropertyType() also gets the null check CollectionProperty.getPropertyType() already has, so the constructor no longer relies on getBlankProperty() catching a NullPointerException.

How Has This Been Tested?

./gradlew :src:core:test and ./gradlew classes style; the enabled test fails if getPropertyType() ignores the map's values.

The test was added without @test in d3a0d32, so it never ran. Its name says string elements but it used Integer values, so it now uses String values, which a MapProperty stores as StringProperty. MapProperty.getPropertyType() gets the null check that CollectionProperty.getPropertyType() already has, so the constructor no longer relies on getBlankProperty() catching a NullPointerException.
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.

1 participant