Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Scala 2.11 cross-compile, upgrade sbt version. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ scmInfo := Some(
/* scala versions and options */
scalaVersion := "2.10.1"

/* scala versions and options */
crossScalaVersions := Seq("2.10.4", "2.11.6")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use the 2.10.5 bug fix version?


// These options will be used for *all* versions.
scalacOptions ++= Seq(
// "-deprecation",
Expand All @@ -38,7 +41,7 @@ scalacOptions ++= Seq(
// These language flags will be used only for 2.10.x.
// Uncomment those you need, or if you hate SIP-18, all of them.
scalacOptions <++= scalaVersion map { sv =>
if (sv startsWith "2.10") List(
if ((sv startsWith "2.10") || (sv startsWith "2.11")) List(
// "-Xverify",
// "-Ywarn-all",
"-feature",
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.12.3
sbt.version=0.13.7
4 changes: 2 additions & 2 deletions src/main/scala/com/codahale/jerkson/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.codahale.jerkson

import com.fasterxml.jackson.databind.JavaType
import com.fasterxml.jackson.databind.`type`.{TypeFactory, ArrayType}
import scala.collection.JavaConversions.asScalaConcurrentMap
import scala.collection.JavaConversions.mapAsScalaConcurrentMap
import java.util.concurrent.ConcurrentHashMap

private[jerkson] object Types {
private val cachedTypes = asScalaConcurrentMap(new ConcurrentHashMap[Manifest[_], JavaType]())
private val cachedTypes = mapAsScalaConcurrentMap(new ConcurrentHashMap[Manifest[_], JavaType]())

def build(factory: TypeFactory, manifest: Manifest[_]): JavaType =
cachedTypes.getOrElseUpdate(manifest, constructType(factory, manifest))
Expand Down