Skip to content

Fix 2D array being passed to Arrays.fill in FloydWarshall #2009

Closed
@ChenOst

Description

@ChenOst

Here an attempt is being made to pass a 2D array to Arrays.fill().
This is not correct as Arrays.fill() accepts a single dimensional array.

I would like to fix this bug myself if that is ok

Test case describing the bug:
Try to run FloydWarshall.java with legitimate input

Expected behavior:
Succeeds

Actual behavior:
java.lang.ArrayStoreException: java.lang.Integer
at java.base/java.util.Arrays.fill(Arrays.java:3639)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions