IOChannelUtils.getFactory should throw an unchecked exception rather than IOException
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
In [this PR](https://github.com/apache/incubator-beam/pull/300#discussion-diff-63109718), we've add a new method, `IOChannelUtils.hasFactory`, which provides a convenient way to verify that a factory exists before calling getFactory. As such, the IOException thrown by getFactory is extra cruft for consumers using the new pattern.
We should update additional consumers to check hasFactory first, and then migrate getFactory to throw a RuntimeException
Imported from Jira [BEAM-281](https://issues.apache.org/jira/browse/BEAM-281). Original Jira may contain additional context.
Reported by: swegner.
Contributor guide
Research direction
Start by locating IOChannelUtils.hasFactory and IOChannelUtils.getFactory, then identify the additional consumers that call getFactory without the new check. Review the imported Jira context if needed. Done means consumers check hasFactory first and getFactory no longer exposes IOException, with the affected behavior covered by the repository's existing validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100