Switch to scala 2.10

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1429079 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2013-01-04 20:02:27 +00:00
parent c61ee931f6
commit 1949846c0a
6 changed files with 19 additions and 29 deletions

View File

@ -274,7 +274,7 @@
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.1</artifactId>
<artifactId>scalatest_${scala-version}</artifactId>
<version>${scalatest-version}</version>
<scope>test</scope>
</dependency>
@ -290,8 +290,8 @@
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-plugin-version}</version>
<executions>
<execution>
@ -327,7 +327,7 @@
<compilerPlugin>
<groupId>org.fusesource.jvmassert</groupId>
<artifactId>jvmassert</artifactId>
<version>1.1</version>
<version>1.4</version>
</compilerPlugin>
</compilerPlugins>
</configuration>
@ -379,13 +379,9 @@
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.fusesource.hawtbuf
</groupId>
<artifactId>
hawtbuf-protoc
</artifactId>
<versionRange>[1.9,)</versionRange>
<groupId>org.fusesource.hawtbuf</groupId>
<artifactId>hawtbuf-protoc</artifactId>
<versionRange>[${hawtbuf-version},)</versionRange>
<goals>
<goal>compile</goal>
</goals>
@ -396,13 +392,9 @@
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.scala-tools</groupId>
<artifactId>
maven-scala-plugin
</artifactId>
<versionRange>
[2.15.1,)
</versionRange>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<versionRange>[${scala-plugin-version},)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>

View File

@ -53,7 +53,7 @@ package object leveldb {
attempt = Thread.currentThread().getContextClassLoader().loadClass(name).newInstance().asInstanceOf[SnappyTrait];
attempt.compress("test")
} catch {
case x =>
case x:Throwable =>
attempt = null
}
}

View File

@ -470,7 +470,7 @@ class LevelDBClient(store: LevelDBStore) {
-1
}
} catch {
case e => throw new Exception("Unexpected version file format: " + version_file)
case e:Throwable => throw new Exception("Unexpected version file format: " + version_file)
}
ver match {
case STORE_SCHEMA_VERSION => // All is good.
@ -702,14 +702,13 @@ class LevelDBClient(store: LevelDBStore) {
}
private def storeCounters = {
def storeMap(key:Array[Byte], map:HashMap[Long, _ <: AnyRef]) {
def storeMap[T <: AnyRef](key:Array[Byte], map:HashMap[Long, T]) {
val baos = new ByteArrayOutputStream()
val os = new ObjectOutputStream(baos);
os.writeInt(map.size);
map.foreach {
case (k, v) =>
os.writeLong(k)
os.writeObject(v)
for( (k,v) <- map ) {
os.writeLong(k)
os.writeObject(v)
}
os.close()
index.put(key, baos.toByteArray)

View File

@ -582,7 +582,6 @@ class LevelDBStore extends LockableServiceSupport with BrokerServiceAware with P
override def removeAsyncMessage(context: ConnectionContext, ack: MessageAck): Unit = {
if( ack.getTransactionId!=null ) {
transaction(ack.getTransactionId).remove(this, ack)
DONE
} else {
waitOn(withUow{uow=>
doRemove(uow, ack.getLastMessageId)

View File

@ -184,7 +184,7 @@ object FileSupport {
try {
proc(closable)
} finally {
try { closable.close } catch { case ignore => }
try { closable.close } catch { case ignore:Throwable => }
}
}

View File

@ -100,8 +100,8 @@
<rome-version>1.0</rome-version>
<saxon-version>9.4</saxon-version>
<saxon-bundle-version>9.4.0.1_2</saxon-bundle-version>
<scala-plugin-version>2.15.2</scala-plugin-version>
<scala-version>2.9.1</scala-version>
<scala-plugin-version>3.1.0</scala-plugin-version>
<scala-version>2.10.0</scala-version>
<scalatest-version>1.8</scalatest-version>
<slf4j-version>1.6.6</slf4j-version>
<spring-version>3.0.7.RELEASE</spring-version>