Skip to content

Commit

Permalink
#420 Make Scala 2.11 compiler happy
Browse files Browse the repository at this point in the history
  • Loading branch information
yruslan committed Sep 21, 2021
1 parent 9f23fe8 commit f483036
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2018 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.cobrix.cobol.reader.extractors.raw

case class FixedBlockParameters(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
/*
* Copyright 2018 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.cobrix.cobol.reader.parameters

case class Bdw(
isBigEndian: Boolean,
adjustment: Int,
blockLength: Option[Int],
recordsPerBlock: Option[Int],
recordsPerBlock: Option[Int]
)
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ object CobolParametersParser {
params.getOrElse(PARAM_IS_BDW_BIG_ENDIAN, "false").toBoolean,
params.getOrElse(PARAM_BDW_ADJUSTMENT, "0").toInt,
params.get(PARAM_BLOCK_LENGTH).map(_.toInt),
params.get(PARAM_RECORDS_PER_BLOCK).map(_.toInt),
params.get(PARAM_RECORDS_PER_BLOCK).map(_.toInt)
)
if (bdw.blockLength.nonEmpty && bdw.recordsPerBlock.nonEmpty) {
throw new IllegalArgumentException(s"Options '$PARAM_BLOCK_LENGTH' and '$PARAM_RECORDS_PER_BLOCK' cannot be used together.")
Expand Down

0 comments on commit f483036

Please sign in to comment.