HHH-9113 - Support for building with Java 8 JDK

This commit is contained in:
Steve Ebersole 2014-05-07 11:27:53 -05:00
parent f237a9d24f
commit 568a16eefa
4 changed files with 25 additions and 5 deletions

View File

@ -98,6 +98,19 @@ subprojects { subProject ->
// minimize changes, at least for now (gradle uses 'build' by default)..
buildDir = "target"
// disable Java 8's doclint (javadoc validation) tool
if ( JavaVersion.current().isJava8Compatible() ) {
tasks.withType(Javadoc) {
// i give up. For now we simply disable javadoc against Java 8 JDK...
// we also seem to be hitting http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6442982
// java.lang.ClassCastException: com.sun.tools.javadoc.MethodDocImpl cannot be cast to com.sun.tools.javadoc.AnnotationTypeElementDocImpl
enabled = false
// ultimately we will still likely need to tweak the doclint settings
}
}
if ( subProject.name.startsWith( 'release' ) || subProject.name.startsWith( 'documentation' ) ) {
return;
}
@ -149,7 +162,7 @@ subprojects { subProject ->
testRuntime( libraries.h2 )
jaxb( libraries.jaxb ){
exclude group: "javax.xml.stream"
exclude group: 'javax.xml.stream'
}
jaxb( libraries.jaxb )
jaxb( libraries.jaxb2_basics )
@ -157,7 +170,12 @@ subprojects { subProject ->
jaxb( libraries.jaxb2_jaxb )
jaxb( libraries.jaxb2_jaxb_xjc )
animalSniffer ( libraries.animal_sniffer )
// we need to use asm 5 for java 8 parsing
animalSniffer( libraries.animal_sniffer ) {
exclude group: 'org.ow2.asm'
}
animalSniffer( 'org.ow2.asm:asm-all:5.0.2' ) { force=true }
javaApiSignature ( libraries.java16_signature )
}

View File

@ -1,4 +1,4 @@
/**
* Defines actual contract used for strategy selection : {@link StrategySelector}.
* SPI package for the {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service.
*/
package org.hibernate.boot.registry.selector.spi;

View File

@ -41,6 +41,7 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.naming.Reference;
import javax.naming.StringRefAddr;
@ -203,7 +204,7 @@ public final class SessionFactoryImpl
private final transient CurrentSessionContext currentSessionContext;
private final transient SQLFunctionRegistry sqlFunctionRegistry;
private final transient SessionFactoryObserverChain observer = new SessionFactoryObserverChain();
private final transient ConcurrentHashMap<EntityNameResolver,Object> entityNameResolvers = new ConcurrentHashMap<EntityNameResolver, Object>();
private final transient ConcurrentMap<EntityNameResolver,Object> entityNameResolvers = new ConcurrentHashMap<EntityNameResolver, Object>();
private final transient QueryPlanCache queryPlanCache;
private final transient CacheImplementor cacheAccess;
private transient boolean isClosed;

View File

@ -26,6 +26,7 @@ package org.hibernate.metamodel.source.spi;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import org.hibernate.metamodel.spi.binding.MetaAttribute;
@ -34,7 +35,7 @@ import org.hibernate.metamodel.spi.binding.MetaAttribute;
*/
public class MetaAttributeContext {
private final MetaAttributeContext parentContext;
private final ConcurrentHashMap<String, MetaAttribute> metaAttributeMap = new ConcurrentHashMap<String, MetaAttribute>();
private final ConcurrentMap<String, MetaAttribute> metaAttributeMap = new ConcurrentHashMap<String, MetaAttribute>();
public MetaAttributeContext() {
this( null );