activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1429079 - in /activemq/trunk: ./ activemq-leveldb-store/ activemq-leveldb-store/src/main/scala/org/apache/activemq/ activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/ activemq-leveldb-store/src/main/scala/org/apache/activem...
Date Fri, 04 Jan 2013 20:02:27 GMT
Author: chirino
Date: Fri Jan  4 20:02:27 2013
New Revision: 1429079

URL: http://svn.apache.org/viewvc?rev=1429079&view=rev
Log:
Switch to scala 2.10

Modified:
    activemq/trunk/activemq-leveldb-store/pom.xml
    activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb.scala
    activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
    activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
    activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/util/FileSupport.scala
    activemq/trunk/pom.xml

Modified: activemq/trunk/activemq-leveldb-store/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/pom.xml?rev=1429079&r1=1429078&r2=1429079&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/pom.xml (original)
+++ activemq/trunk/activemq-leveldb-store/pom.xml Fri Jan  4 20:02:27 2013
@@ -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>

Modified: activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb.scala
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb.scala?rev=1429079&r1=1429078&r2=1429079&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb.scala
(original)
+++ activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb.scala
Fri Jan  4 20:02:27 2013
@@ -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
         }
       }

Modified: activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala?rev=1429079&r1=1429078&r2=1429079&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
(original)
+++ activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
Fri Jan  4 20:02:27 2013
@@ -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)

Modified: activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala?rev=1429079&r1=1429078&r2=1429079&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
(original)
+++ activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
Fri Jan  4 20:02:27 2013
@@ -582,7 +582,6 @@ class LevelDBStore extends LockableServi
     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)

Modified: activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/util/FileSupport.scala
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/util/FileSupport.scala?rev=1429079&r1=1429078&r2=1429079&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/util/FileSupport.scala
(original)
+++ activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/util/FileSupport.scala
Fri Jan  4 20:02:27 2013
@@ -184,7 +184,7 @@ object FileSupport {
     try {
       proc(closable)
     } finally {
-      try { closable.close  }  catch { case ignore =>  }
+      try { closable.close  }  catch { case ignore:Throwable =>  }
     }
   }
 

Modified: activemq/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/pom.xml?rev=1429079&r1=1429078&r2=1429079&view=diff
==============================================================================
--- activemq/trunk/pom.xml (original)
+++ activemq/trunk/pom.xml Fri Jan  4 20:02:27 2013
@@ -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>



Mime
View raw message