Details
-
Improvement
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
2.6.0
-
None
Description
XmlIO.Read.from takes a String as an argument, which is then used to create a StaticValueProvider for the XmlSource that is built later on. As XmlSource takes a ValueProvider<String> to specify the file source(s) to read from.
I would suggest to store a ValueProvider<String> in XmlIO.Read.Builder instead of a String, and overload from with two implementations. One being a wrapper creating a StaticValueProvider, i.e.
public Read<T> from(String fileOrPatternSpec) { return from(StaticValueProvider.of(fileOrPatternSpec)); } public Read<T> from(ValueProvider<String> fileOrPatternSpec) { return toBuilder().setFileOrPatternSpec(fileOrPatternSpec).build(); }
Attachments
Issue Links
- is duplicated by
-
BEAM-8948 ValueProvider support for read method of XML IO connector
- Resolved
- links to