Skip to content

Commit

Permalink
Apply auto-formatting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
weco-bot committed Oct 2, 2024
1 parent 42fa951 commit 536656c
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 536656c

Please sign in to comment.