From 7c991ddd414c1313a08e25c0604a9529cf010774 Mon Sep 17 00:00:00 2001
From: maximthomas <maxim.thomas@gmail.com>
Date: Mon, 20 Jan 2025 10:26:09 +0000
Subject: [PATCH] Update target JDK to 11 and move to JakartaEE

---
 opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java     |    4 ++--
 opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteSequenceTestCase.java |    3 ++-
 opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteStringTestCase.java   |    2 +-
 opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java      |    5 +++--
 opendj-core/src/main/java/org/forgerock/opendj/ldap/Base64.java               |    3 ++-
 opendj-core/pom.xml                                                           |   28 +++++++++++++++-------------
 6 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/opendj-core/pom.xml b/opendj-core/pom.xml
index b01d5a1..6a3020e 100644
--- a/opendj-core/pom.xml
+++ b/opendj-core/pom.xml
@@ -13,6 +13,7 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2011-2016 ForgeRock AS.
+  Portions Copyright 2025 3A Systems LLC.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
@@ -76,20 +77,21 @@
             <artifactId>build-tools</artifactId>
             <scope>test</scope>
         </dependency>
-        
+
         <!--         java.xml.bind (JAXB) - REMOVED -->
-	    <dependency>
-          <groupId>jakarta.xml.bind</groupId>
-          <artifactId>jakarta.xml.bind-api</artifactId>
-		</dependency>
-		<dependency>
-          <groupId>org.glassfish.jaxb</groupId>
-          <artifactId>jaxb-core</artifactId>
-		</dependency>
-		<dependency>
-          <groupId>org.glassfish.jaxb</groupId>
-          <artifactId>jaxb-runtime</artifactId>
-		</dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        
 
 	    <!-- BC FIPS Provider libs -->
 	    <dependency>
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Base64.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Base64.java
index 25b2418..2607aac 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Base64.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Base64.java
@@ -13,6 +13,7 @@
  *
  * Copyright 2006-2009 Sun Microsystems, Inc.
  * Portions copyright 2012-2016 ForgeRock AS.
+ * Portions copyright 2025 3A Systems LLC.
  */
 package org.forgerock.opendj.ldap;
 
@@ -29,7 +30,7 @@
  * sets of three bytes with eight significant bits each to sets of four bytes
  * with six significant bits each.
  * <p>
- * <b>NOTE:</b> the JDK class {@link jakarta.xml.bind.DatatypeConverter} provides
+ * <b>NOTE:</b> the JDK class {@link javax.xml.bind.DatatypeConverter} provides
  * similar functionality, however the methods are better suited to the LDAP SDK.
  * For example, the JDK encoder does not handle array/offset/len parameters, and
  * the decoder ignores invalid Base64 data.
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteSequenceTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteSequenceTestCase.java
index 27dcb0f..39bd7e9 100644
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteSequenceTestCase.java
+++ b/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteSequenceTestCase.java
@@ -13,13 +13,14 @@
  *
  * Copyright 2010 Sun Microsystems, Inc.
  * Portions copyright 2014 ForgeRock AS.
+ * Portions Copyright 2025 3A Systems LLC.
  */
 package org.forgerock.opendj.ldap;
 
 import java.io.ByteArrayOutputStream;
 import java.util.Arrays;
 
-import jakarta.xml.bind.DatatypeConverter;
+import javax.xml.bind.DatatypeConverter;
 
 import org.testng.Assert;
 import org.testng.annotations.Test;
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteStringTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteStringTestCase.java
index b4c754f..8c75e09 100644
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteStringTestCase.java
+++ b/opendj-core/src/test/java/org/forgerock/opendj/ldap/ByteStringTestCase.java
@@ -22,7 +22,7 @@
 import java.nio.charset.CharsetDecoder;
 import java.util.Arrays;
 
-import jakarta.xml.bind.DatatypeConverter;
+import javax.xml.bind.DatatypeConverter;
 
 import org.forgerock.i18n.LocalizedIllegalArgumentException;
 import org.testng.Assert;
diff --git a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java
index c02cf4a..5a0d487 100644
--- a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java
+++ b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java
@@ -12,11 +12,12 @@
  * information: "Portions Copyright [year] [name of copyright owner]".
  *
  * Copyright 2012-2016 ForgeRock AS.
+ * Portions Copyright 2025 3A Systems LLC.
  */
 package org.forgerock.opendj.rest2ldap;
 
-import static jakarta.xml.bind.DatatypeConverter.parseDateTime;
-import static jakarta.xml.bind.DatatypeConverter.printDateTime;
+import static javax.xml.bind.DatatypeConverter.parseDateTime;
+import static javax.xml.bind.DatatypeConverter.printDateTime;
 import static org.forgerock.opendj.ldap.Filter.alwaysFalse;
 import static org.forgerock.opendj.ldap.Functions.byteStringToBoolean;
 import static org.forgerock.opendj.ldap.Functions.byteStringToGeneralizedTime;
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java b/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java
index 4561a94..8e06561 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java
@@ -13,7 +13,7 @@
  *
  * Portions Copyright 2006-2007-2008 Sun Microsystems, Inc.
  * Portions Copyright 2013-2016 ForgeRock AS.
- * Portions Copyright 2023-2024 3A Systems LLC.
+ * Portions Copyright 2023-2025 3A Systems LLC.
  */
 package org.opends.server.config;
 
@@ -43,7 +43,7 @@
 import java.util.Map.Entry;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import static jakarta.xml.bind.DatatypeConverter.printDateTime;
+import static javax.xml.bind.DatatypeConverter.printDateTime;
 import static org.forgerock.opendj.ldap.Functions.*;
 import static org.opends.messages.ConfigMessages.*;
 import static org.opends.server.protocols.internal.Requests.newSearchRequest;

--
Gitblit v1.10.0