From 536656ca8a485acb989f24893da595d85852115e Mon Sep 17 00:00:00 2001 From: Github on behalf of Wellcome Collection Date: Wed, 2 Oct 2024 08:56:54 +0000 Subject: [PATCH] Apply auto-formatting rules --- .../bag_unpacker/storage/Unarchiver.scala | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/storage/Unarchiver.scala b/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/storage/Unarchiver.scala index 3759adce8..5ed1fe1af 100644 --- a/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/storage/Unarchiver.scala +++ b/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/storage/Unarchiver.scala @@ -1,9 +1,17 @@ package weco.storage_service.bag_unpacker.storage - import java.io.{BufferedInputStream, InputStream} -import org.apache.commons.compress.archivers.{ArchiveEntry, ArchiveException, ArchiveInputStream, ArchiveStreamFactory} -import org.apache.commons.compress.compressors.{CompressorException, CompressorInputStream, CompressorStreamFactory} +import org.apache.commons.compress.archivers.{ + ArchiveEntry, + ArchiveException, + ArchiveInputStream, + ArchiveStreamFactory +} +import org.apache.commons.compress.compressors.{ + CompressorException, + CompressorInputStream, + CompressorStreamFactory +} import org.apache.commons.io.input.CloseShieldInputStream import scala.util.{Failure, Success, Try} @@ -88,7 +96,8 @@ object Unarchiver { // We have to wrap in a BufferedInputStream because this method // only takes InputStreams that support the `mark()` method. new ArchiveStreamFactory() - .createArchiveInputStream(new BufferedInputStream(inputStream)).asInstanceOf[ArchiveInputStream[ArchiveEntry]] + .createArchiveInputStream(new BufferedInputStream(inputStream)) + .asInstanceOf[ArchiveInputStream[ArchiveEntry]] } match { case Success(stream) => Right(stream) case Failure(err: ArchiveException) => Left(ArchiveFormatError(err))