Skip to content

Support S3Path.resolve(Path) for non-S3Path arguments #377

@ennoruijters

Description

@ennoruijters

This is a partial resubmission of Upplication/Amazon-S3-FileSystem-NIO2#104, which was made by my colleague @sbeimin.

Task Description

S3Path.resolve(Path) currently assumes that its argument is always another S3Path, and throws a ClassCastException if it is not (except for absolute paths, for which you do get a neat error message).

This is inconvenient for us, as we often store relative paths internally using the result of java.nio.file.Paths.get("example/file"). I propose to allow other Path types as arguments for relative paths.

Tasks

The following tasks will need to be carried out:

  • Allow relative non-S3Path paths as arguments to S3Path.resolve().
  • Include unit tests.

Help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions