Skip to content

Commit 3fbc4b6

Browse files
author
vaclavvondruska
committed
Migrated to Scala 2.10
1 parent f0cdb61 commit 3fbc4b6

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ project/plugins/project/
4848

4949

5050

51+
52+
.DS_Store

build.sbt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name := "SCALA-DNS"
22

33
version := "1.0"
44

5-
scalaVersion := "2.9.2"
5+
scalaVersion := "2.10.0"
66

77
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
88

@@ -16,14 +16,14 @@ libraryDependencies += "com.typesafe.akka" % "akka-actor" % "2.0.3"
1616

1717
libraryDependencies += "com.typesafe.akka" % "akka-remote" % "2.0.3"
1818

19-
libraryDependencies += "org.scalatest" %% "scalatest" % "1.8" % "test"
19+
libraryDependencies += "org.scalatest" %% "scalatest" % "1.9" % "test"
2020

2121
libraryDependencies += "org.skife.com.typesafe.config" % "typesafe-config" % "0.3.0"
2222

2323
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.0.3"
2424

25-
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala" % "2.1.2"
25+
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.10" % "2.1.3"
2626

27-
libraryDependencies += "com.fasterxml.jackson.core" % "jackson-core" % "2.1.2"
27+
libraryDependencies += "com.fasterxml.jackson.core" % "jackson-core" % "2.1.3"
2828

2929
// libraryDependencies += "org.apache.servicemix.bundles" % "org.apache.servicemix.bundles.aws-java-sdk" % "1.3.27"

src/main/scala/payload/Name.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ object Name {
103103

104104
val newName = if(existingName.isEmpty) name else name.take(name.indexOfSlice(existingName))
105105

106-
val trailer = if(existingName.isEmpty) Array() else RRData.shortToBytes((names(nameToString(existingName)) + (MASK_POINTER << 8)).toShort)
106+
val trailer = if(existingName.isEmpty) Array[Byte]() else RRData.shortToBytes((names(nameToString(existingName)) + (MASK_POINTER << 8)).toShort)
107107
(bytes ++ toByteArray(newName) ++ trailer, if(newName.isEmpty) names else names ++ storeNewName(newName))
108108
}
109109

src/main/scala/records/A.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ case class A(record: Long) extends AbstractRecord {
2626
lazy val address = RRData.intToBytes(record.toInt).map(b => if (b < 0) b + 256 else b).reverse.mkString(".")
2727

2828
def toByteArray = RRData.intToBytes(record.toInt)
29-
def addressToByteArray = Array()
29+
def addressToByteArray = Array[Byte]()
3030

3131
def isEqualTo(any: Any) = any match {
3232
case r: A => r.record == record

src/main/scala/server/http/HttpHandler.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ object HttpHandler extends SimpleChannelUpstreamHandler {
6666
val indexFiles = "index.html" :: "index.htm" :: Nil
6767
mimeTypesMap.addMimeTypes("application/x-javascript js JS")
6868
mimeTypesMap.addMimeTypes("text/css css CSS")
69+
mimeTypesMap.addMimeTypes("text/html html htm HTML HTM")
6970

7071
def sanitizeURI(uri: String) = {
7172
val decUri = try {

0 commit comments

Comments
 (0)