Fixes AMQ-5176: Support building ActiveMQ using Java 8 JDK

This commit is contained in:
Hiram Chirino 2014-05-07 10:53:31 -04:00
parent a20c3a07a2
commit bdb24ee7c7
13 changed files with 36 additions and 18 deletions

View File

@ -59,7 +59,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.fusesource.hawtdispatch</groupId> <groupId>org.fusesource.hawtdispatch</groupId>
<artifactId>hawtdispatch-scala</artifactId> <artifactId>hawtdispatch-scala-2.11</artifactId>
<version>${hawtdispatch-version}</version> <version>${hawtdispatch-version}</version>
</dependency> </dependency>
<dependency> <dependency>
@ -319,7 +319,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.scalatest</groupId> <groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala-version}</artifactId> <artifactId>scalatest_2.11</artifactId>
<version>${scalatest-version}</version> <version>${scalatest-version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>

View File

@ -25,7 +25,7 @@ import java.io.File
import java.io.IOException import java.io.IOException
import java.util.concurrent._ import java.util.concurrent._
import java.util.concurrent.atomic.AtomicLong import java.util.concurrent.atomic.AtomicLong
import reflect.BeanProperty import beans.BeanProperty
import org.apache.activemq.store._ import org.apache.activemq.store._
import java.util._ import java.util._
import collection.mutable.ListBuffer import collection.mutable.ListBuffer

View File

@ -17,7 +17,7 @@
package org.apache.activemq.leveldb.replicated package org.apache.activemq.leveldb.replicated
import org.linkedin.util.clock.Timespan import org.linkedin.util.clock.Timespan
import scala.reflect.BeanProperty import scala.beans.BeanProperty
import org.apache.activemq.util.ServiceStopper import org.apache.activemq.util.ServiceStopper
import org.apache.activemq.leveldb.{LevelDBClient, RecordLog, LevelDBStore} import org.apache.activemq.leveldb.{LevelDBClient, RecordLog, LevelDBStore}
import java.net.{NetworkInterface, InetAddress} import java.net.{NetworkInterface, InetAddress}

View File

@ -27,7 +27,7 @@ import java.util.concurrent._
import java.io.{IOException, File} import java.io.{IOException, File}
import java.net.{SocketAddress, InetSocketAddress, URI} import java.net.{SocketAddress, InetSocketAddress, URI}
import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong} import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong}
import scala.reflect.BeanProperty import scala.beans.BeanProperty
import org.fusesource.hawtbuf.{Buffer, AsciiBuffer} import org.fusesource.hawtbuf.{Buffer, AsciiBuffer}
class PositionSync(val position:Long, count:Int) extends CountDownLatch(count) class PositionSync(val position:Long, count:Int) extends CountDownLatch(count)

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.activemq.leveldb.replicated package org.apache.activemq.leveldb.replicated
import scala.reflect.BeanProperty import scala.beans.BeanProperty
import java.util.UUID import java.util.UUID
import org.apache.activemq.leveldb.LevelDBStore import org.apache.activemq.leveldb.LevelDBStore
import org.apache.activemq.leveldb.util.FileSupport._ import org.apache.activemq.leveldb.util.FileSupport._

View File

@ -28,7 +28,7 @@ import org.apache.activemq.leveldb.util._
import FileSupport._ import FileSupport._
import java.io.{IOException, RandomAccessFile, File} import java.io.{IOException, RandomAccessFile, File}
import scala.reflect.BeanProperty import scala.beans.BeanProperty
import java.util.concurrent.{CountDownLatch, TimeUnit} import java.util.concurrent.{CountDownLatch, TimeUnit}
object SlaveLevelDBStore extends Log object SlaveLevelDBStore extends Log

View File

@ -24,7 +24,7 @@ import org.codehaus.jackson.map.ObjectMapper
import collection.JavaConversions._ import collection.JavaConversions._
import java.util.LinkedHashMap import java.util.LinkedHashMap
import java.lang.{IllegalStateException, String} import java.lang.{IllegalStateException, String}
import reflect.BeanProperty import beans.BeanProperty
import org.codehaus.jackson.annotate.JsonProperty import org.codehaus.jackson.annotate.JsonProperty
import org.apache.zookeeper.KeeperException.NoNodeException import org.apache.zookeeper.KeeperException.NoNodeException

View File

@ -20,7 +20,7 @@ package org.apache.activemq.leveldb.dfs
import org.apache.hadoop.conf.Configuration import org.apache.hadoop.conf.Configuration
import org.apache.activemq.util.ServiceStopper import org.apache.activemq.util.ServiceStopper
import org.apache.hadoop.fs.FileSystem import org.apache.hadoop.fs.FileSystem
import scala.reflect.BeanProperty import scala.beans.BeanProperty
import java.net.InetAddress import java.net.InetAddress
import org.apache.activemq.leveldb.LevelDBStore import org.apache.activemq.leveldb.LevelDBStore

View File

@ -17,7 +17,6 @@
package org.apache.activemq.partition.dto; package org.apache.activemq.partition.dto;
import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.annotate.JsonProperty;
import scala.actors.threadpool.Arrays;
import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.Collection;
@ -37,7 +36,7 @@ public class Target {
} }
public Target(String ...ids) { public Target(String ...ids) {
this.ids.addAll(Arrays.asList(ids)); this.ids.addAll(java.util.Arrays.asList(ids));
} }
@Override @Override

View File

@ -99,6 +99,27 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>set-system-properties</goal>
</goals>
<configuration>
<properties>
<property>
<name>javax.xml.accessExternalSchema</name>
<value>file</value>
</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>

View File

@ -22,7 +22,6 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import scala.actors.threadpool.Arrays;
import javax.jms.Connection; import javax.jms.Connection;
import javax.jms.Message; import javax.jms.Message;
@ -56,7 +55,7 @@ public class DurableSubscriptionOffline1Test extends DurableSubscriptionOfflineT
List<Object[]> testParameters = new ArrayList<Object[]>(); List<Object[]> testParameters = new ArrayList<Object[]>();
Boolean[] booleanValues = {Boolean.FALSE, Boolean.TRUE}; Boolean[] booleanValues = {Boolean.FALSE, Boolean.TRUE};
List<Boolean> booleans = Arrays.asList(booleanValues); List<Boolean> booleans = java.util.Arrays.asList(booleanValues);
for (Boolean booleanValue : booleans) { for (Boolean booleanValue : booleans) {
for (PersistenceAdapterChoice persistenceAdapterChoice : persistenceAdapterChoices) { for (PersistenceAdapterChoice persistenceAdapterChoice : persistenceAdapterChoices) {
Object[] currentChoice = {persistenceAdapterChoice, booleanValue}; Object[] currentChoice = {persistenceAdapterChoice, booleanValue};

View File

@ -33,7 +33,6 @@ import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException; import org.xml.sax.SAXParseException;
import scala.actors.threadpool.Arrays;
public class ValidateXMLConfigTest { public class ValidateXMLConfigTest {
@ -51,7 +50,7 @@ public class ValidateXMLConfigTest {
// resource:copy-resource brings all config files into target/conf // resource:copy-resource brings all config files into target/conf
File sampleConfDir = new File("target/conf"); File sampleConfDir = new File("target/conf");
final HashSet<String> skipped = new HashSet<String>(Arrays.asList(new String[]{ final HashSet<String> skipped = new HashSet<String>(java.util.Arrays.asList(new String[]{
"resin-web.xml", "web.xml" "resin-web.xml", "web.xml"
})); }));

View File

@ -64,7 +64,7 @@
<geronimo-version>1.0</geronimo-version> <geronimo-version>1.0</geronimo-version>
<hadoop-version>1.0.0</hadoop-version> <hadoop-version>1.0.0</hadoop-version>
<hawtbuf-version>1.10</hawtbuf-version> <hawtbuf-version>1.10</hawtbuf-version>
<hawtdispatch-version>1.20</hawtdispatch-version> <hawtdispatch-version>1.21-SNAPSHOT</hawtdispatch-version>
<howl-version>0.1.8</howl-version> <howl-version>0.1.8</howl-version>
<hsqldb-version>1.8.0.12</hsqldb-version> <hsqldb-version>1.8.0.12</hsqldb-version>
<httpclient-version>4.2.5</httpclient-version> <httpclient-version>4.2.5</httpclient-version>
@ -107,10 +107,10 @@
<saxon-version>9.5.1-2</saxon-version> <saxon-version>9.5.1-2</saxon-version>
<saxon-bundle-version>9.5.1-1_1</saxon-bundle-version> <saxon-bundle-version>9.5.1-1_1</saxon-bundle-version>
<scala-plugin-version>3.1.0</scala-plugin-version> <scala-plugin-version>3.1.0</scala-plugin-version>
<scala-version>2.9.1</scala-version> <scala-version>2.11.0</scala-version>
<scala-bundle-version>2.9.1_3</scala-bundle-version> <scala-bundle-version>2.9.1_3</scala-bundle-version>
<shiro-version>1.2.2</shiro-version> <shiro-version>1.2.2</shiro-version>
<scalatest-version>1.8</scalatest-version> <scalatest-version>2.1.5</scalatest-version>
<slf4j-version>1.7.5</slf4j-version> <slf4j-version>1.7.5</slf4j-version>
<snappy-version>1.1.0.1</snappy-version> <snappy-version>1.1.0.1</snappy-version>
<spring-version>3.2.8.RELEASE</spring-version> <spring-version>3.2.8.RELEASE</spring-version>