← 返回首页
Ignore empty Strings during String to FileArray conversion by stefanhahmann · Pull Request #479 · scijava/scijava-common · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Ignore empty Strings during String to FileArray conversion#479

Merged
ctrueden merged 2 commits into
scijava:masterfrom
stefanhahmann:file-list-coverters-empty-input
Jul 10, 2024
Merged

Ignore empty Strings during String to FileArray conversion#479
ctrueden merged 2 commits into
scijava:masterfrom
stefanhahmann:file-list-coverters-empty-input

Conversation

Copy link
Copy Markdown

  • The current state of the code is that an empty String, is converted to a new File("") object initialized with an empty String
  • A File object instantiated by this will be a File object with an absolute Path that is equivalent to the Path from which the application was started
  • The result of this is a bit unpredictable
  • This PR thus suggests that an empty String should not be converted to File object at all and not be added to the output

* The current state of the code is that an empty String, is converted to a new File("") object with an empty String * A File object instantiated by this will be a File object with an absolute Path that is equivalent to the Path from which the application was started * The result of this is relatively unpredictable * Thus empty String should not be converted to File object and not be added to the output
ctrueden merged commit a2d0042 into scijava:master Jul 10, 2024
Copy link
Copy Markdown
Member

@stefanhahmann Thanks!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants

Footer

© 2026 GitHub, Inc.