openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1689951 - in /openjpa/trunk: openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/
Date Wed, 08 Jul 2015 19:54:53 GMT
Author: struberg
Date: Wed Jul  8 19:54:53 2015
New Revision: 1689951

URL: http://svn.apache.org/r1689951
Log:
OPENJPA-2600 add cast which is needed for Java8

Java8 fails do properly coerc the method calls if we don't 'hint'
it to the right ParameterizedType.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java?rev=1689951&r1=1689950&r2=1689951&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
Wed Jul  8 19:54:53 2015
@@ -1579,7 +1579,7 @@ public class AnnotationPersistenceMappin
                 && StringUtils.isEmpty(pcols[i].columnDefinition())
                 && (AccessController.doPrivileged(J2DoPrivHelper
                     .isAnnotationPresentAction(fm.getDeclaredType(),
-                        xmlRootElementClass))).booleanValue()) {
+                        (Class<? extends Annotation>) xmlRootElementClass))).booleanValue())
{
                 DBDictionary dict = ((MappingRepository) getRepository())
                     .getDBDictionary();
                 if (dict.supportsXMLColumn)

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java?rev=1689951&r1=1689950&r2=1689951&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java
Wed Jul  8 19:54:53 2015
@@ -18,6 +18,7 @@
  */
 package org.apache.openjpa.persistence;
 
+import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Field;
 import java.lang.reflect.Member;
@@ -159,10 +160,10 @@ public class AnnotationPersistenceXMLMet
         // check immediately whether the class has JAXB XML annotations
         if (cls == null || xmlTypeClass == null
             || !((AccessController.doPrivileged(J2DoPrivHelper
-                .isAnnotationPresentAction(cls, xmlTypeClass))).booleanValue()
+                .isAnnotationPresentAction(cls, (Class<? extends Annotation>) xmlTypeClass))).booleanValue()
                 && (AccessController
                 .doPrivileged(J2DoPrivHelper.isAnnotationPresentAction(cls,
-                    xmlRootElementClass))).booleanValue()))
+                        (Class<? extends Annotation>) xmlRootElementClass))).booleanValue()))
             return null;
 
         // find / create metadata
@@ -211,7 +212,7 @@ public class AnnotationPersistenceXMLMet
 
         // handle inheritance at sub-element level
         if ((AccessController.doPrivileged(J2DoPrivHelper
-            .isAnnotationPresentAction(superclass, xmlTypeClass)))
+            .isAnnotationPresentAction(superclass, (Class<? extends Annotation>) xmlTypeClass)))
             .booleanValue())
             populateFromReflection(superclass, meta);
 
@@ -234,7 +235,7 @@ public class AnnotationPersistenceXMLMet
                         xmlname = member.getName();
                     if ((AccessController.doPrivileged(J2DoPrivHelper
                         .isAnnotationPresentAction(((Field) member).getType(),
-                            xmlTypeClass))).booleanValue()) {
+                                (Class<? extends Annotation>) xmlTypeClass))).booleanValue())
{
                         field = _repos.addXMLClassMetaData(((Field) member).getType());
                         parseXmlRootElement(((Field) member).getType(), field);
                         populateFromReflection(((Field) member).getType()



Mime
View raw message