Permalink
Browse files

Merge pull request #3 from jlc/scala-2.10

Scala 2.10
  • Loading branch information...
2 parents 8c05f27 + bd67462 commit 461c6a40277fd7594082ccdd3092fdf082e36b48 @Shimi committed Apr 23, 2013
View
@@ -9,8 +9,8 @@ scalaVersion := "2.10.1"
compileOrder := CompileOrder.JavaThenScala
libraryDependencies ++= Seq(
- "org.apache.cassandra" % "cassandra-all" % "1.1.0",
- "org.apache.cassandra" % "cassandra-thrift" % "1.1.0",
+ "org.apache.cassandra" % "cassandra-all" % "1.1.10",
+ "org.apache.cassandra" % "cassandra-thrift" % "1.1.10",
"com.eaio.uuid" % "uuid" % "3.2",
"org.slf4j" % "slf4j-api" % "1.6.4",
"commons-pool" % "commons-pool" % "1.6",
@@ -24,3 +24,5 @@ publishTo <<= (version) { version: String =>
if (version.trim.endsWith("SNAPSHOT")) "snapshots"
else "releases/" } ))
}
+
+scalacOptions ++= Seq("-feature", "-Xlog-implicits")
@@ -82,7 +82,7 @@ case class Column[Owner](val name:ByteBuffer,
private def stringIfPossible(a:ByteBuffer):String = {
if (a == null) return "NULL"
- if (a.array.length <= 4) return "Array (" + a.array.mkString(", ") + ")"
+ if (a.array.length <= 4) return "Array (" + byteArrayOps(a.array).mkString(", ") + ")"
if (a.array.length > 1000) return a.array.toString
try { Conversions.string(a) } catch { case _:Throwable => a.array.toString }
}
@@ -1,5 +1,6 @@
package com.shorrockin.cascal.model
+import scala.language.implicitConversions
import org.apache.cassandra.thrift.IndexClause
import java.nio.ByteBuffer
import org.apache.cassandra.thrift.{IndexExpression => CassIndexExpression}
@@ -52,7 +52,7 @@ case class SuperColumn(val value:ByteBuffer, val key:SuperKey) extends Gettable[
}
private def stringIfPossible(a:ByteBuffer):String = {
- if (a.array.length <= 4) return "Array (" + a.array.mkString(", ") + ")"
+ if (a.array.length <= 4) return "Array (" + byteArrayOps(a.array).mkString(", ") + ")"
if (a.array.length > 1000) return a.array.toString
try { Conversions.string(a) } catch { case _:Throwable => a.array.toString }
}
@@ -1,5 +1,6 @@
package com.shorrockin.cascal.serialization
+import scala.language.existentials
import java.nio.ByteBuffer
import reflect.Manifest
import java.lang.annotation.Annotation
@@ -1,5 +1,6 @@
package com.shorrockin.cascal.session
+import scala.language.existentials
import org.apache.cassandra.thrift.{Deletion, Mutation}
import com.shorrockin.cascal.model._
import com.shorrockin.cascal.utils.Utils.now
@@ -1,5 +1,6 @@
package com.shorrockin.cascal.session
+import scala.language.implicitConversions
import scala.collection.mutable
import collection.immutable.HashSet
import java.util.concurrent.atomic.AtomicLong
@@ -1,5 +1,6 @@
package com.shorrockin.cascal.utils
+import scala.language.implicitConversions
import java.nio.charset.Charset
import com.shorrockin.cascal.model.{Column, Keyspace}
import java.util.{Date, UUID => JavaUUID}
@@ -12,7 +13,7 @@ import java.nio.ByteBuffer
object Conversions {
val utf8 = Charset.forName("UTF-8")
- implicit def keyspace(str:String) = new Keyspace(str)
+ implicit def stringToKeyspace(str:String) = new Keyspace(str)
implicit def byteBuffer(date:Date):ByteBuffer = DateSerializer.toByteBuffer(date)
implicit def date(bytes:ByteBuffer):Date = DateSerializer.fromByteBuffer(bytes)
@@ -1,5 +1,6 @@
package com.shorrockin.cascal.utils
+import scala.language.reflectiveCalls
import _root_.scala.io.Source
import java.io.{FileWriter, InputStream, FileOutputStream, File}
import java.util.concurrent.TimeUnit
@@ -1,5 +1,6 @@
package com.shorrockin.cascal
+import scala.language.implicitConversions
import org.junit.{Assert, Test}
import com.shorrockin.cascal.utils.Conversions._
import com.shorrockin.cascal.serialization.TupleSerializer

0 comments on commit 461c6a4

Please sign in to comment.