This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git
The following commit(s) were added to refs/heads/master by this push:
new 1fdf245 OPENJPA-2885 ensure openjpa-junit5 can support jakarta as
well without any shade
1fdf245 is described below
commit 1fdf245200fc839d25d59a637994c62173429bd2
Author: Romain Manni-Bucau <[email protected]>
AuthorDate: Tue Oct 26 16:54:26 2021 +0200
OPENJPA-2885 ensure openjpa-junit5 can support jakarta as well without any
shade
---
.../junit5/internal/OpenJPADirectoriesEnhancer.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git
a/openjpa-junit5/src/main/java/org/apache/openjpa/junit5/internal/OpenJPADirectoriesEnhancer.java
b/openjpa-junit5/src/main/java/org/apache/openjpa/junit5/internal/OpenJPADirectoriesEnhancer.java
index c79535f..d86f2bd 100644
---
a/openjpa-junit5/src/main/java/org/apache/openjpa/junit5/internal/OpenJPADirectoriesEnhancer.java
+++
b/openjpa-junit5/src/main/java/org/apache/openjpa/junit5/internal/OpenJPADirectoriesEnhancer.java
@@ -205,9 +205,12 @@ public class OpenJPADirectoriesEnhancer implements
Runnable {
private static class OpenJpaClassLoader extends BaseClassLoader {
private static final String PERSITENCE_CAPABLE =
Type.getDescriptor(PersistenceCapable.class);
- private static final String ENTITY = Type.getDescriptor(Entity.class);
- private static final String EMBEDDABLE =
Type.getDescriptor(Embeddable.class);
- private static final String MAPPED_SUPERCLASS =
Type.getDescriptor(MappedSuperclass.class);
+ private static final String ENTITY = "Ljavax/persistence/Entity;";
+ private static final String ENTITY2 = "Ljakarta/persistence/Entity;";
+ private static final String EMBEDDABLE = "Ljavax/persistence/Entity;";
+ private static final String EMBEDDABLE2 =
"Ljakarta/persistence/Entity;";
+ private static final String MAPPED_SUPERCLASS =
"Ljavax/persistence/Entity;";
+ private static final String MAPPED_SUPERCLASS2 =
"Ljakarta/persistence/Entity;";
private final MetaDataRepository repos;
private final ClassLoader tmpLoader;
@@ -298,7 +301,10 @@ public class OpenJPADirectoriesEnhancer implements
Runnable {
public AnnotationVisitor visitAnnotation(final String
descriptor, final boolean visible) {
if (ENTITY.equals(descriptor) ||
EMBEDDABLE.equals(descriptor) ||
- MAPPED_SUPERCLASS.equals(descriptor)) {
+ MAPPED_SUPERCLASS.equals(descriptor) ||
+ ENTITY2.equals(descriptor) ||
+ EMBEDDABLE2.equals(descriptor) ||
+ MAPPED_SUPERCLASS2.equals(descriptor)) {
throw new MissingEnhancement(); // we already went
into visit() so we miss the enhancement
}
return new EmptyVisitor().visitAnnotation(descriptor,
visible);