Skip to content

Commit

Permalink
Minor refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Oct 4, 2021
1 parent 053b8c6 commit 1a6f809
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ import scala.concurrent.{ExecutionContext, Future}
val range = copyPartition.range
val source = copyPartition.sourceLocation.validate(conf)
val encodedKey = URLEncoder.encode(source.key, StandardCharsets.UTF_8.toString)
val sourceHeaderValuePrefix = s"/${source.bucket}/${encodedKey}"
val sourceHeaderValuePrefix = s"/${source.bucket}/$encodedKey"
val sourceHeaderValue = sourceVersionId
.map(versionId => s"$sourceHeaderValuePrefix?versionId=$versionId")
.getOrElse(sourceHeaderValuePrefix)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import akka.util.ByteString

package object auth {

private val Digits = "0123456789abcdef".toCharArray()
private val Digits = "0123456789abcdef".toCharArray

@InternalApi private[impl] def encodeHex(bytes: Array[Byte]): String = {
val length = bytes.length
val out = new Array[Char](length * 2)
for (i <- 0 to length - 1) {
for (i <- 0 until length) {
val b = bytes(i)
out(i * 2) = Digits((b >> 4) & 0xF)
out(i * 2 + 1) = Digits(b & 0xF)
Expand Down

0 comments on commit 1a6f809

Please sign in to comment.