Matthias247 / jawampa

Web Application Messaging Protocol (WAMP v2) support for Java
Apache License 2.0
148 stars 56 forks source link

Broken Java 1.6 target compliance. #92

Open alex-vas opened 8 years ago

alex-vas commented 8 years ago

The IdGenerator class appears to depend on ThreadLocalRandom JDKs class which is introduced in Java 1.7 only.

See the java docs: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html

We need to either bump up the java version in pom.xml or change to to use something like java.util.Random which is known to have poor performance.

See more on JDKs random generator performance comparisons: http://java-performance.info/java-util-random-java-util-concurrent-threadlocalrandom-multithreaded-environments/

I would vote for changing the code and runtime compliance requirements (Language Level) to 1.7 in the pom files. Not sure how it would affect Android developers though.