Skip to content

Conversation

@ascopes
Copy link
Owner

@ascopes ascopes commented Jan 29, 2023

  • Fix some bugs in PathFileObject

    • Mark methods in PathFileObject as raising NoSuchFileException rather than FileNotFoundException
      which was previously incorrect information.
    • Fix bug where the 'name' of a PathFileObject could previously have been an absolute path
      if the PathFileObject was initialised with an absolute file path. Now it will match the
      string representation of the relative path on the object.
    • Rename getRoot to the clearer 'getRootPath' which is consistent with other
      method naming in this class.
    • Update IllegalArgumentException that is thrown if a root path is not absolute
      so that it conveys the value of the erroneous parameter in the error message.
  • Implement tests for PathFileObject.

  • Replace FileNotFoundException in FileBuilderImpl with NoSuchFileException
    This keeps the exception handling consistent with the handling used elsewhere,
    since this API relies on the NIO API rather than the IO API for file system
    access.

  • Remove a reference to FileNotFoundException in a test, use NoSuchFileException instead.
    Enables consistency with the rest of the API.

@ascopes ascopes added bug Something isn't working housekeeping testing Improvements to test packs labels Jan 29, 2023
@ascopes ascopes self-assigned this Jan 29, 2023
- Mark methods in PathFileObject as raising NoSuchFileException rather than FileNotFoundException
  which was previously incorrect information.
- Fix bug where the 'name' of a PathFileObject could previously have been an absolute path
  if the PathFileObject was initialised with an absolute file path. Now it will match the
  string representation of the relative path on the object.
- Rename getRoot to the clearer 'getRootPath' which is consistent with other
  method naming in this class.
- Update IllegalArgumentException that is thrown if a root path is not absolute
  so that it conveys the value of the erroneous parameter in the error message.
- Implement tests for PathFileObject.
…tion

This keeps the exception handling consistent with the handling used elsewhere,
since this API relies on the NIO API rather than the IO API for file system
access.
…Exception instead.

Enables consistency with the rest of the API.
@ascopes ascopes force-pushed the task/path-file-object-tests branch from 5b936c4 to 2c97913 Compare January 29, 2023 15:42
@ascopes ascopes merged commit 84606ca into main Jan 29, 2023
@ascopes ascopes deleted the task/path-file-object-tests branch January 29, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working testing Improvements to test packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant