Skip to content

Javadoc: Document how FileInputStream option values are opened - #448

Merged
garydgregory merged 1 commit into
apache:masterfrom
oscerd:javadoc-file-input-stream
Oct 29, 2026
Merged

garydgregory merged 1 commit into
apache:masterfrom
oscerd:javadoc-file-input-stream

Conversation

@oscerd

@oscerd oscerd commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Options of type FileInputStream (the < code in PatternOptionBuilder, or TypeHandler.openFile()) open the file as soon as the value is converted and hand back an open stream. The Javadoc didn't say that the caller is responsible for closing it, or that opening a special file such as a named pipe blocks, exactly like new FileInputStream(String) does.

This documents both in TypeHandler and openFile(), and adds the missing < row to the PatternOptionBuilder table.

Javadoc only, no behavior change.

  • Read the contribution guidelines for this project.
  • Read the ASF Generative Tooling Guidance if you use Artificial Intelligence (AI).
  • I used AI to create any part of, or all of, this pull request. Which AI tool was used to create this pull request, and to what extent did it contribute? Claude Code (Claude Opus 5.5) was used to analyze the issue and to prepare the change and this description.
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best practice. Not applicable: Javadoc only.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process.

🤖 Generated with Claude Code

The default FileInputStream converter, the '<' code in
PatternOptionBuilder and TypeHandler.openFile() open the file as soon
as the value is converted. The Javadoc didn't say that the caller has
to close the stream, or that opening something like a named pipe
blocks, just as new FileInputStream(String) does. Document both and add
the missing '<' row to the PatternOptionBuilder table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@garydgregory
garydgregory merged commit 1abdc3b into apache:master Oct 29, 2026
10 checks passed
@garydgregory

Copy link
Copy Markdown
Member

TY @oscerd merged. The table is missing a heading, but that's a different issue.

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.

2 participants