|
16 | 16 |
|
17 | 17 | package za.co.absa.cobrix.cobol.processor |
18 | 18 |
|
19 | | -import za.co.absa.cobrix.cobol.parser.recordformats.RecordFormat.FixedLength |
20 | 19 | import za.co.absa.cobrix.cobol.processor.impl.{ArrayOfAnyHandler, StreamProcessor} |
21 | 20 | import za.co.absa.cobrix.cobol.reader.VarLenNestedReader |
22 | | -import za.co.absa.cobrix.cobol.reader.extractors.raw.{FixedRecordLengthRawRecordExtractor, RawRecordContext, RawRecordExtractor} |
| 21 | +import za.co.absa.cobrix.cobol.reader.extractors.raw.RawRecordExtractor |
23 | 22 | import za.co.absa.cobrix.cobol.reader.parameters.{CobolParametersParser, Parameters, ReaderParameters} |
24 | 23 | import za.co.absa.cobrix.cobol.reader.schema.CobolSchema |
25 | 24 | import za.co.absa.cobrix.cobol.reader.stream.SimpleStream |
@@ -116,12 +115,6 @@ object CobolProcessor { |
116 | 115 |
|
117 | 116 | reader.recordExtractor(0, dataStream, headerStream) match { |
118 | 117 | case Some(extractor) => extractor |
119 | | - case None if readerParameters.recordFormat == FixedLength => |
120 | | - val dataStream = inputStream.copyStream() |
121 | | - val ctx = RawRecordContext.builder(dataStream, getCobolSchema(readerParameters).copybook) |
122 | | - .withReaderParams(readerParameters) |
123 | | - .build() |
124 | | - new FixedRecordLengthRawRecordExtractor(ctx, readerParameters.recordLength) |
125 | 118 | case None => |
126 | 119 | throw new IllegalArgumentException(s"Cannot create a record extractor for the given reader parameters. " + |
127 | 120 | "Please check the copybook and the reader parameters." |
|
0 commit comments