Skip to content

fix(ConfigParser): ImageResources constructor - #142

Merged
raphinesse merged 1 commit into
apache:masterfrom
raphinesse:fix-image-resources
Apr 12, 2020
Merged

fix(ConfigParser): ImageResources constructor#142
raphinesse merged 1 commit into
apache:masterfrom
raphinesse:fix-image-resources

Conversation

@raphinesse

Copy link
Copy Markdown
Contributor

Motivation and Context

The previous ImageResources constructor did not cover the case where a single integer argument is given to construct an empty array of the given length. This broke the map method since it uses that constructor variant.

Description

This PR fixes that situation by using a static factory method instead of overriding the native Array constructor.

Testing

New regression test passes

The previous ImageResources constructor did not cover the case where a
single integer argument is given to construct an empty array of the
given length. This broke the `map` method since it uses that constructor
variant.

This commit fixes that situation by using a static factory method
instead of overriding the native Array constructor.
@raphinesse raphinesse added the bug label Apr 12, 2020
@raphinesse raphinesse added this to the 4.0.1 milestone Apr 12, 2020
@raphinesse
raphinesse requested a review from erisu April 12, 2020 11:16
@raphinesse
raphinesse merged commit 0c03967 into apache:master Apr 12, 2020
@raphinesse
raphinesse deleted the fix-image-resources branch April 12, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants