Skip to content

Commit

Permalink
Dependencies update for 4.0.0 (#1309)
Browse files Browse the repository at this point in the history
* JAXB-API dependency updated.
* JAXB-RI
* Angus Mail

Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
  • Loading branch information
Tomas-Kraus committed Sep 21, 2021
1 parent d1881ff commit 08e6244
Show file tree
Hide file tree
Showing 56 changed files with 191 additions and 462 deletions.
4 changes: 2 additions & 2 deletions bundles/eclipselink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down
6 changes: 4 additions & 2 deletions bundles/eclipselink/src/main/assembly/eclipselink.zip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
<include>jakarta.validation:jakarta.validation-api</include>
<include>jakarta.json:jakarta.json-api</include>
<include>com.sun.activation:jakarta.activation</include>
<include>com.sun.mail:jakarta.mail</include>
<include>jakarta.activation:jakarta.activation-api</include>
<include>org.eclipse.angus:angus-activation</include>
<include>jakarta.mail:jakarta.mail-api</include>
<include>org.eclipse.angus:angus-mail</include>
<include>com.sun.xml.bind:jaxb-core</include>
<include>com.sun.xml.bind:jaxb-xjc</include>
<include>org.eclipse.parsson:parsson</include>
Expand Down
4 changes: 2 additions & 2 deletions bundles/others/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@
<artifactId>angus-activation</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
Expand Down
4 changes: 2 additions & 2 deletions bundles/p2site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
<artifactId>angus-activation</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -31,7 +31,7 @@
public class OSGITestHelper {
// Environment variables defined in antbuild.properties/antbuild.xml
private static final String PLUGINS_DIR = System.getProperty("plugins.dir","target/osgi-test-plugins/");
private static final String ACTIVATION_JAR = System.getProperty("activation.jar", "jakarta.activation.jar");
private static final String ACTIVATION_JAR = System.getProperty("activation.jar", "jakarta.activation-api.jar");
private static final String JAXB_API_JAR = System.getProperty("jaxb-api.jar", "jakarta.xml.bind-api.jar");
private static final String JAXB_OSGI = System.getProperty("jaxb-osgi.jar", "jaxb-xjc.jar");
private static final String JAXRS_JAR = System.getProperty("jaxrs.jar", "jakarta.ws.rs-api.jar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
* @see org.eclipse.persistence.oxm.XMLDescriptor
*/
public class ClassDescriptor extends CoreDescriptor<AttributeGroup, DescriptorEventManager, DatabaseField, InheritancePolicy, InstantiationPolicy, Vector, ObjectBuilder> implements Cloneable, Serializable {
protected Class javaClass;
protected Class<?> javaClass;
protected String javaClassName;
protected Vector<DatabaseTable> tables;
protected transient DatabaseTable defaultTable;
Expand Down Expand Up @@ -1485,7 +1485,7 @@ public void convertClassNamesToClasses(ClassLoader classLoader){
Class redirectorClass = null;

if (getJavaClassName() != null){
Class descriptorClass = null;
Class<?> descriptorClass = null;
try{
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
Expand Down Expand Up @@ -5034,7 +5034,7 @@ public void setHasRelationships(boolean hasRelationships) {
* Every descriptor maps one and only one class.
*/
@Override
public void setJavaClass(Class theJavaClass) {
public void setJavaClass(Class<?> theJavaClass) {
javaClass = theJavaClass;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,6 @@ public static DescriptorException nullForNonNullAggregate(Object object, Databas

public static DescriptorException nullPointerWhileConstructorInstantiation(ClassDescriptor descriptor, Throwable exception) {
Object[] args = { };

DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION, args), descriptor, exception);
descriptorException.setErrorCode(NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION);
return descriptorException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -183,6 +183,7 @@ public class ExceptionLocalizationResource extends ListResourceBundle {
{ "sdo_helper_invalid_target_for_typehelper", "The provided target Class [{0}] must be EclipseLink SDOTypeHelper class." },
{ "sdo_helper_invalid_target_for_xmlhelper", "The provided target Class [{0}] must be one of EclipseLink SDOXMLHelper, EclipseLink XMLMarshaller or EclipseLink XMLUnmarshaller." },
{ "sdo_helper_invalid_target_for_xsdhelper", "The provided target Class [{0}] must be EclipseLink SDOXSDHelper class." },
{ "jaxb_context_factory_property_invalid", "Property eclipselink.moxy.factory value {0} is invalid" },
{ "jaxb_helper_invalid_jaxbcontext", "The provided JAXBContext [{0}] is not an EclipseLink JAXBContext, and therefore could not be converted." },
{ "jaxb_helper_invalid_unmarshaller", "The provided Unmarshaller [{0}] is not an EclipseLink JAXBUnmarshaller, and therefore could not be converted." },
{ "jaxb_helper_invalid_marshaller", "The provided Marshaller [{0}] is not an EclipseLink JAXBMarshaller, and therefore could not be converted." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public interface Descriptor <
/**
* Return the java class.
*/
Class getJavaClass();
Class<?> getJavaClass();

/**
* Return the class name, used by the MW.
Expand Down Expand Up @@ -224,7 +224,7 @@ public interface Descriptor <
* Set the Java class that this descriptor maps.
* Every descriptor maps one and only one class.
*/
void setJavaClass(Class theJavaClass);
void setJavaClass(Class<?> theJavaClass);

/**
* INTERNAL:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions moxy/org.eclipse.persistence.moxy.utils.xjc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<artifactId>org.eclipse.persistence.moxy</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
4 changes: 2 additions & 2 deletions moxy/org.eclipse.persistence.moxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
<artifactId>angus-activation</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
</dependency>

<!--Test dependencies-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ public JAXBUnmarshaller createUnmarshaller() throws jakarta.xml.bind.JAXBExcepti
* Create a JAXBValidator. The JAXBValidator is used to validate Java objects against
* an XSD.
*/
@Override
public JAXBValidator createValidator() {
return new JAXBValidator(getXMLContext().createValidator());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -29,6 +29,27 @@
*/
public class JAXBContextProperties {

/**
* The name of the property used to specify which JAXB Context Factory
* will be used for context creation.
* Default {@link org.eclipse.persistence.jaxb.JAXBContextFactory} will be used when this property
* is not set.
* Supported values are listed in {@link Factory} class.
* @since 4.0
*/
public static final String MOXY_FACTORY = "eclipselink.moxy.factory";

/**
* Supported values of {@code eclipselink.moxy.factory} property.
* @since 4.0
*/
public static final class Factory {
/** Use default {@link org.eclipse.persistence.jaxb.JAXBContextFactory} for context creation. */
public static final String DEFAULT = "default";
/** Use {@link org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory} for context creation. */
public static final String DYNAMIC = "dynamic";
}

/**`
* The name of the property used to specify a value that will be prepended
* to all keys that are mapped to an XML attribute. By default there is no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,6 @@ public UnmarshallerHandler getUnmarshallerHandler() {
return new JAXBUnmarshallerHandler(this);
}

@Override
public void setValidating(boolean validate) throws JAXBException {
if (validate) {
xmlUnmarshaller.setValidationMode(XMLUnmarshaller.SCHEMA_VALIDATION);
Expand All @@ -780,7 +779,6 @@ public void setValidating(boolean validate) throws JAXBException {
}
}

@Override
public boolean isValidating() throws JAXBException {
return xmlUnmarshaller.getValidationMode() != XMLUnmarshaller.NONVALIDATING;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -18,14 +18,13 @@
import jakarta.xml.bind.PropertyException;
import jakarta.xml.bind.ValidationEventHandler;
import jakarta.xml.bind.ValidationException;
import jakarta.xml.bind.Validator;
import jakarta.xml.bind.helpers.DefaultValidationEventHandler;
import org.eclipse.persistence.oxm.XMLValidator;

/**
* Facilitates JAXBValidation.
*/
public class JAXBValidator implements Validator {
public class JAXBValidator /*implements Validator*/ {
private ValidationEventHandler validationEventHandler;
private XMLValidator xmlValidator;

Expand All @@ -49,7 +48,6 @@ public JAXBValidator(XMLValidator newValidator) {
* @return true if a valid root object, false otherwise
* @throws JAXBException
*/
@Override
public boolean validateRoot(Object rootObject) throws JAXBException {
if (rootObject == null) {
throw new IllegalArgumentException();
Expand All @@ -69,7 +67,6 @@ public boolean validateRoot(Object rootObject) throws JAXBException {
* @return true if a valid object, false otherwise
* @throws JAXBException
*/
@Override
public boolean validate(Object object) throws JAXBException {
if (object == null) {
throw new IllegalArgumentException();
Expand All @@ -82,7 +79,6 @@ public boolean validate(Object object) throws JAXBException {
}
}

@Override
public void setEventHandler(ValidationEventHandler newValidationEventHandler) throws JAXBException {
if (null == newValidationEventHandler) {
validationEventHandler = new DefaultValidationEventHandler();
Expand All @@ -92,20 +88,17 @@ public void setEventHandler(ValidationEventHandler newValidationEventHandler) th
xmlValidator.setErrorHandler(new JAXBErrorHandler(validationEventHandler));
}

@Override
public ValidationEventHandler getEventHandler() throws JAXBException {
return validationEventHandler;
}

@Override
public void setProperty(String key, Object value) throws PropertyException {
if (key == null) {
throw new IllegalArgumentException();
}
throw new PropertyException(key, value);
}

@Override
public Object getProperty(String key) throws PropertyException {
if (key == null) {
throw new IllegalArgumentException();
Expand Down

0 comments on commit 08e6244

Please sign in to comment.