Skip to content

Provide safe defaults for temp file prefix/suffix when null and add regression test for issue #95. - #118

Open
LuckysHorizon wants to merge 1 commit into
apache:masterfrom
LuckysHorizon:fix-95-urllocation-tempfile-defaults
Open

Provide safe defaults for temp file prefix/suffix when null and add regression test for issue #95.#118
LuckysHorizon wants to merge 1 commit into
apache:masterfrom
LuckysHorizon:fix-95-urllocation-tempfile-defaults

Conversation

@LuckysHorizon

Copy link
Copy Markdown

Summary

This pull request fixes issue #95 by providing safe default values when
URLLocation creates a temporary file using Files.createTempFile(...).

Previously, passing null as the prefix or suffix resulted in a
NullPointerException.

Changes

  • Use "url" as the default prefix when the provided prefix is null
  • Use ".tmp" as the default suffix when the provided suffix is null
  • Add a regression test covering this behavior

Fixes #95

Provide safe defaults for temp file prefix/suffix when null and add regression test for issue apache#95.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

URLLocation: NPE from Files.createTempFile(null, null)

1 participant