Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Karasiq committed Feb 27, 2018
1 parent f2f15bc commit 96e5c69
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
@@ -1,6 +1,6 @@
package com.karasiq.nanoboard.sources.png

import java.net.{InetSocketAddress, URI}
import java.net.{InetSocketAddress, URL}

import scala.collection.JavaConversions._
import scala.util.Try
Expand Down Expand Up @@ -70,7 +70,7 @@ class BoardPngSource(encoding: DataEncodingStage)(implicit as: ActorSystem, am:
}

protected def getUrl(e: Element, attr: String): Option[String] = {
Try(new URI(e.absUrl(attr)))
Try(new URL(e.absUrl(attr)))
.toOption
.filter(_.getPath.toLowerCase.endsWith(".png")) // .filter(_.getPath.matches("([^\\?\\s]+)?/src/([^\\?\\s]+)?\\.png"))
.map(_.toString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FileEncodingTest extends FlatSpec with Matchers {
it should "be encoded in CBOR format" in {
val result = CBORMessagePackFormat.writeMessages(testMessages)
CBORMessagePackFormat.parseMessages(result) shouldBe testMessages
result.hashCode() shouldBe 652261416
result.hashCode() shouldBe -1960199224
// TestFiles.saveToFile(result, "cbor-test.bin")
}
}

0 comments on commit 96e5c69

Please sign in to comment.