Skip to content

Commit 08e6244

Browse files
authored
Dependencies update for 4.0.0 (#1309)
* JAXB-API dependency updated. * JAXB-RI * Angus Mail Signed-off-by: Tomas Kraus <[email protected]>
1 parent d1881ff commit 08e6244

File tree

56 files changed

+191
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+191
-462
lines changed

bundles/eclipselink/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
<optional>true</optional>
7777
</dependency>
7878
<dependency>
79-
<groupId>com.sun.mail</groupId>
80-
<artifactId>jakarta.mail</artifactId>
79+
<groupId>org.eclipse.angus</groupId>
80+
<artifactId>angus-mail</artifactId>
8181
<optional>true</optional>
8282
</dependency>
8383
<dependency>

bundles/eclipselink/src/main/assembly/eclipselink.zip.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@
8383
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
8484
<include>jakarta.validation:jakarta.validation-api</include>
8585
<include>jakarta.json:jakarta.json-api</include>
86-
<include>com.sun.activation:jakarta.activation</include>
87-
<include>com.sun.mail:jakarta.mail</include>
86+
<include>jakarta.activation:jakarta.activation-api</include>
87+
<include>org.eclipse.angus:angus-activation</include>
88+
<include>jakarta.mail:jakarta.mail-api</include>
89+
<include>org.eclipse.angus:angus-mail</include>
8890
<include>com.sun.xml.bind:jaxb-core</include>
8991
<include>com.sun.xml.bind:jaxb-xjc</include>
9092
<include>org.eclipse.parsson:parsson</include>

bundles/others/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@
149149
<artifactId>angus-activation</artifactId>
150150
</dependency>
151151
<dependency>
152-
<groupId>com.sun.mail</groupId>
153-
<artifactId>jakarta.mail</artifactId>
152+
<groupId>org.eclipse.angus</groupId>
153+
<artifactId>angus-mail</artifactId>
154154
</dependency>
155155
<dependency>
156156
<groupId>com.sun.xml.bind</groupId>

bundles/p2site/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
<artifactId>angus-activation</artifactId>
126126
</dependency>
127127
<dependency>
128-
<groupId>com.sun.mail</groupId>
129-
<artifactId>jakarta.mail</artifactId>
128+
<groupId>org.eclipse.angus</groupId>
129+
<artifactId>angus-mail</artifactId>
130130
</dependency>
131131
<dependency>
132132
<groupId>com.sun.xml.bind</groupId>

bundles/tests/src/test/java/org/eclipse/persistence/testing/osgi/OSGITestHelper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -31,7 +31,7 @@
3131
public class OSGITestHelper {
3232
// Environment variables defined in antbuild.properties/antbuild.xml
3333
private static final String PLUGINS_DIR = System.getProperty("plugins.dir","target/osgi-test-plugins/");
34-
private static final String ACTIVATION_JAR = System.getProperty("activation.jar", "jakarta.activation.jar");
34+
private static final String ACTIVATION_JAR = System.getProperty("activation.jar", "jakarta.activation-api.jar");
3535
private static final String JAXB_API_JAR = System.getProperty("jaxb-api.jar", "jakarta.xml.bind-api.jar");
3636
private static final String JAXB_OSGI = System.getProperty("jaxb-osgi.jar", "jaxb-xjc.jar");
3737
private static final String JAXRS_JAR = System.getProperty("jaxrs.jar", "jakarta.ws.rs-api.jar");

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/ClassDescriptor.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
* @see org.eclipse.persistence.oxm.XMLDescriptor
157157
*/
158158
public class ClassDescriptor extends CoreDescriptor<AttributeGroup, DescriptorEventManager, DatabaseField, InheritancePolicy, InstantiationPolicy, Vector, ObjectBuilder> implements Cloneable, Serializable {
159-
protected Class javaClass;
159+
protected Class<?> javaClass;
160160
protected String javaClassName;
161161
protected Vector<DatabaseTable> tables;
162162
protected transient DatabaseTable defaultTable;
@@ -1485,7 +1485,7 @@ public void convertClassNamesToClasses(ClassLoader classLoader){
14851485
Class redirectorClass = null;
14861486

14871487
if (getJavaClassName() != null){
1488-
Class descriptorClass = null;
1488+
Class<?> descriptorClass = null;
14891489
try{
14901490
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
14911491
try {
@@ -5034,7 +5034,7 @@ public void setHasRelationships(boolean hasRelationships) {
50345034
* Every descriptor maps one and only one class.
50355035
*/
50365036
@Override
5037-
public void setJavaClass(Class theJavaClass) {
5037+
public void setJavaClass(Class<?> theJavaClass) {
50385038
javaClass = theJavaClass;
50395039
}
50405040

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java

-1
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,6 @@ public static DescriptorException nullForNonNullAggregate(Object object, Databas
12601260

12611261
public static DescriptorException nullPointerWhileConstructorInstantiation(ClassDescriptor descriptor, Throwable exception) {
12621262
Object[] args = { };
1263-
12641263
DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION, args), descriptor, exception);
12651264
descriptorException.setErrorCode(NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION);
12661265
return descriptorException;

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/IntegrityChecker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/localization/i18n/ExceptionLocalizationResource.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 1998, 2018 IBM Corporation and/or its affiliates. All rights reserved.
44
*
55
* This program and the accompanying materials are made available under the
@@ -183,6 +183,7 @@ public class ExceptionLocalizationResource extends ListResourceBundle {
183183
{ "sdo_helper_invalid_target_for_typehelper", "The provided target Class [{0}] must be EclipseLink SDOTypeHelper class." },
184184
{ "sdo_helper_invalid_target_for_xmlhelper", "The provided target Class [{0}] must be one of EclipseLink SDOXMLHelper, EclipseLink XMLMarshaller or EclipseLink XMLUnmarshaller." },
185185
{ "sdo_helper_invalid_target_for_xsdhelper", "The provided target Class [{0}] must be EclipseLink SDOXSDHelper class." },
186+
{ "jaxb_context_factory_property_invalid", "Property eclipselink.moxy.factory value {0} is invalid" },
186187
{ "jaxb_helper_invalid_jaxbcontext", "The provided JAXBContext [{0}] is not an EclipseLink JAXBContext, and therefore could not be converted." },
187188
{ "jaxb_helper_invalid_unmarshaller", "The provided Unmarshaller [{0}] is not an EclipseLink JAXBUnmarshaller, and therefore could not be converted." },
188189
{ "jaxb_helper_invalid_marshaller", "The provided Marshaller [{0}] is not an EclipseLink JAXBMarshaller, and therefore could not be converted." },

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/mappings/Descriptor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public interface Descriptor <
106106
/**
107107
* Return the java class.
108108
*/
109-
Class getJavaClass();
109+
Class<?> getJavaClass();
110110

111111
/**
112112
* Return the class name, used by the MW.
@@ -224,7 +224,7 @@ public interface Descriptor <
224224
* Set the Java class that this descriptor maps.
225225
* Every descriptor maps one and only one class.
226226
*/
227-
void setJavaClass(Class theJavaClass);
227+
void setJavaClass(Class<?> theJavaClass);
228228

229229
/**
230230
* INTERNAL:

jpa/eclipselink.jaxrs.test/src/main/resources/org/eclipse/persistence/testing/jaxrs/model/jaxb.properties

-13
This file was deleted.

jpa/eclipselink.jpa.test/src/it/resources/eclipselink-advanced-field-access-model/org/eclipse/persistence/testing/models/jpa/fieldaccess/relationships/jaxb.properties

-13
This file was deleted.

jpa/eclipselink.jpa.test/src/it/resources/eclipselink-annotation-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties

-13
This file was deleted.

jpa/eclipselink.jpa.test/src/it/resources/eclipselink-delimited-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties

-13
This file was deleted.

jpa/eclipselink.jpa.test/src/it/resources/eclipselink-lob-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties

-13
This file was deleted.

moxy/org.eclipse.persistence.moxy.utils.xjc/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
<artifactId>org.eclipse.persistence.moxy</artifactId>
4141
<scope>runtime</scope>
4242
</dependency>
43+
<dependency>
44+
<groupId>jakarta.activation</groupId>
45+
<artifactId>jakarta.activation-api</artifactId>
46+
</dependency>
4347
</dependencies>
4448

4549
<build>

moxy/org.eclipse.persistence.moxy/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
<artifactId>angus-activation</artifactId>
8282
</dependency>
8383
<dependency>
84-
<groupId>com.sun.mail</groupId>
85-
<artifactId>jakarta.mail</artifactId>
84+
<groupId>org.eclipse.angus</groupId>
85+
<artifactId>angus-mail</artifactId>
8686
</dependency>
8787

8888
<!--Test dependencies-->

moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContext.java

-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ public JAXBUnmarshaller createUnmarshaller() throws jakarta.xml.bind.JAXBExcepti
445445
* Create a JAXBValidator. The JAXBValidator is used to validate Java objects against
446446
* an XSD.
447447
*/
448-
@Override
449448
public JAXBValidator createValidator() {
450449
return new JAXBValidator(getXMLContext().createValidator());
451450
}

moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContextProperties.java

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -29,6 +29,27 @@
2929
*/
3030
public class JAXBContextProperties {
3131

32+
/**
33+
* The name of the property used to specify which JAXB Context Factory
34+
* will be used for context creation.
35+
* Default {@link org.eclipse.persistence.jaxb.JAXBContextFactory} will be used when this property
36+
* is not set.
37+
* Supported values are listed in {@link Factory} class.
38+
* @since 4.0
39+
*/
40+
public static final String MOXY_FACTORY = "eclipselink.moxy.factory";
41+
42+
/**
43+
* Supported values of {@code eclipselink.moxy.factory} property.
44+
* @since 4.0
45+
*/
46+
public static final class Factory {
47+
/** Use default {@link org.eclipse.persistence.jaxb.JAXBContextFactory} for context creation. */
48+
public static final String DEFAULT = "default";
49+
/** Use {@link org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory} for context creation. */
50+
public static final String DYNAMIC = "dynamic";
51+
}
52+
3253
/**`
3354
* The name of the property used to specify a value that will be prepended
3455
* to all keys that are mapped to an XML attribute. By default there is no

moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBUnmarshaller.java

-2
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,6 @@ public UnmarshallerHandler getUnmarshallerHandler() {
771771
return new JAXBUnmarshallerHandler(this);
772772
}
773773

774-
@Override
775774
public void setValidating(boolean validate) throws JAXBException {
776775
if (validate) {
777776
xmlUnmarshaller.setValidationMode(XMLUnmarshaller.SCHEMA_VALIDATION);
@@ -780,7 +779,6 @@ public void setValidating(boolean validate) throws JAXBException {
780779
}
781780
}
782781

783-
@Override
784782
public boolean isValidating() throws JAXBException {
785783
return xmlUnmarshaller.getValidationMode() != XMLUnmarshaller.NONVALIDATING;
786784
}

moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBValidator.java

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -18,14 +18,13 @@
1818
import jakarta.xml.bind.PropertyException;
1919
import jakarta.xml.bind.ValidationEventHandler;
2020
import jakarta.xml.bind.ValidationException;
21-
import jakarta.xml.bind.Validator;
2221
import jakarta.xml.bind.helpers.DefaultValidationEventHandler;
2322
import org.eclipse.persistence.oxm.XMLValidator;
2423

2524
/**
2625
* Facilitates JAXBValidation.
2726
*/
28-
public class JAXBValidator implements Validator {
27+
public class JAXBValidator /*implements Validator*/ {
2928
private ValidationEventHandler validationEventHandler;
3029
private XMLValidator xmlValidator;
3130

@@ -49,7 +48,6 @@ public JAXBValidator(XMLValidator newValidator) {
4948
* @return true if a valid root object, false otherwise
5049
* @throws JAXBException
5150
*/
52-
@Override
5351
public boolean validateRoot(Object rootObject) throws JAXBException {
5452
if (rootObject == null) {
5553
throw new IllegalArgumentException();
@@ -69,7 +67,6 @@ public boolean validateRoot(Object rootObject) throws JAXBException {
6967
* @return true if a valid object, false otherwise
7068
* @throws JAXBException
7169
*/
72-
@Override
7370
public boolean validate(Object object) throws JAXBException {
7471
if (object == null) {
7572
throw new IllegalArgumentException();
@@ -82,7 +79,6 @@ public boolean validate(Object object) throws JAXBException {
8279
}
8380
}
8481

85-
@Override
8682
public void setEventHandler(ValidationEventHandler newValidationEventHandler) throws JAXBException {
8783
if (null == newValidationEventHandler) {
8884
validationEventHandler = new DefaultValidationEventHandler();
@@ -92,20 +88,17 @@ public void setEventHandler(ValidationEventHandler newValidationEventHandler) th
9288
xmlValidator.setErrorHandler(new JAXBErrorHandler(validationEventHandler));
9389
}
9490

95-
@Override
9691
public ValidationEventHandler getEventHandler() throws JAXBException {
9792
return validationEventHandler;
9893
}
9994

100-
@Override
10195
public void setProperty(String key, Object value) throws PropertyException {
10296
if (key == null) {
10397
throw new IllegalArgumentException();
10498
}
10599
throw new PropertyException(key, value);
106100
}
107101

108-
@Override
109102
public Object getProperty(String key) throws PropertyException {
110103
if (key == null) {
111104
throw new IllegalArgumentException();

0 commit comments

Comments
 (0)