This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch spring6
in repository https://gitbox.apache.org/repos/asf/isis.git

commit a6bcd96b7ffc8ff8384ab81de6d3635a6df5aa0b
Author: Andi Huber <[email protected]>
AuthorDate: Sun Nov 13 09:11:15 2022 +0100

    ISIS-3275: migrate commons
---
 commons/src/main/java/module-info.java                        |  4 ++--
 ...otations_SynthesizedMergedAnnotationInvocationHandler.java | 10 ++++++----
 .../org/apache/causeway/commons/internal/resources/_Xml.java  | 10 +++++-----
 commons/src/test/java/org/apache/causeway/commons/X.java      |  5 -----
 .../causeway/commons/internal/resources/XmlRoundTripTest.java | 11 +++++------
 5 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/commons/src/main/java/module-info.java 
b/commons/src/main/java/module-info.java
index aebeb4b206..155d04756f 100644
--- a/commons/src/main/java/module-info.java
+++ b/commons/src/main/java/module-info.java
@@ -62,7 +62,6 @@ module org.apache.causeway.commons {
     requires transitive java.desktop;
     requires transitive java.sql;
     requires transitive java.xml;
-    requires transitive java.xml.bind;
     requires transitive lombok;
     requires transitive org.apache.logging.log4j;
     requires transitive org.jdom2;
@@ -71,8 +70,9 @@ module org.apache.causeway.commons {
     requires transitive spring.beans;
     requires transitive spring.context;
     requires transitive spring.core;
+    requires transitive jakarta.xml.bind;
 
     // JAXB JUnit test
-    opens org.apache.causeway.commons.internal.resources to java.xml.bind;
+    opens org.apache.causeway.commons.internal.resources to jakarta.xml.bind;
 
 }
\ No newline at end of file
diff --git 
a/commons/src/main/java/org/apache/causeway/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java
 
b/commons/src/main/java/org/apache/causeway/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java
index 6b4de058b0..5c5108abd2 100644
--- 
a/commons/src/main/java/org/apache/causeway/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java
+++ 
b/commons/src/main/java/org/apache/causeway/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java
@@ -32,7 +32,7 @@ import 
org.springframework.core.annotation.AnnotationConfigurationException;
 import org.springframework.core.annotation.AnnotationUtils;
 import org.springframework.core.annotation.MergedAnnotation;
 import org.springframework.core.annotation.MergedAnnotations;
-import org.springframework.core.annotation.SynthesizedAnnotation;
+//import org.springframework.core.annotation.SynthesizedAnnotation;
 import org.springframework.lang.Nullable;
 import org.springframework.util.Assert;
 import org.springframework.util.ClassUtils;
@@ -236,9 +236,11 @@ implements InvocationHandler {
                         additional.get(), null, annotationType);
 
         val classLoader = annotationType.getClassLoader();
-        val interfaces = isVisible(classLoader, SynthesizedAnnotation.class)
-                ? new Class<?>[] {annotationType, SynthesizedAnnotation.class}
-                : new Class<?>[] {annotationType};
+        //TODO[ISIS-3275]
+        val interfaces = //isVisible(classLoader, SynthesizedAnnotation.class)
+                //? new Class<?>[] {annotationType, 
SynthesizedAnnotation.class}
+                //:
+                    new Class<?>[] {annotationType};
         val proxy = (A) Proxy.newProxyInstance(classLoader, interfaces, 
invocationHandler);
         return Optional.of(proxy);
     }
diff --git 
a/commons/src/main/java/org/apache/causeway/commons/internal/resources/_Xml.java
 
b/commons/src/main/java/org/apache/causeway/commons/internal/resources/_Xml.java
index 6dd223ab2a..e62b9937c6 100644
--- 
a/commons/src/main/java/org/apache/causeway/commons/internal/resources/_Xml.java
+++ 
b/commons/src/main/java/org/apache/causeway/commons/internal/resources/_Xml.java
@@ -27,11 +27,6 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.stream.Collectors;
 
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.namespace.QName;
 
 import org.springframework.lang.Nullable;
@@ -44,6 +39,11 @@ import 
org.apache.causeway.commons.internal.collections._Maps;
 import org.apache.causeway.commons.internal.exceptions._Exceptions;
 import org.apache.causeway.commons.internal.reflection._Annotations;
 
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBElement;
+import jakarta.xml.bind.JAXBException;
+import jakarta.xml.bind.Marshaller;
+import jakarta.xml.bind.annotation.XmlRootElement;
 import lombok.Builder;
 import lombok.NonNull;
 import lombok.SneakyThrows;
diff --git a/commons/src/test/java/org/apache/causeway/commons/X.java 
b/commons/src/test/java/org/apache/causeway/commons/X.java
deleted file mode 100644
index 37f6e5d4c7..0000000000
--- a/commons/src/test/java/org/apache/causeway/commons/X.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.apache.causeway.commons;
-
-public class X {
-
-}
diff --git 
a/commons/src/test/java/org/apache/causeway/commons/internal/resources/XmlRoundTripTest.java
 
b/commons/src/test/java/org/apache/causeway/commons/internal/resources/XmlRoundTripTest.java
index c4e889ba36..b6daf41baa 100644
--- 
a/commons/src/test/java/org/apache/causeway/commons/internal/resources/XmlRoundTripTest.java
+++ 
b/commons/src/test/java/org/apache/causeway/commons/internal/resources/XmlRoundTripTest.java
@@ -18,17 +18,16 @@
  */
 package org.apache.causeway.commons.internal.resources;
 
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlType;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.SneakyThrows;

Reply via email to